0
Son üç ay içinde ürünün minimum satış fiyatını seçen MDX sorgusu yazmaya çalışıyorum, ancak çalışamam. Böyle bir şey denerseniz function "" expects a tuple set expression for the 1 argument
Son üç ay içinde mdx sorgusunda en düşük değer
:
WITH
SET [CurrentMonth] AS StrToMember('[Date].[Calendar].[Month].&[' + FORMAT(Now(), "yyyyMM") + ']')
SET [LastThreeMonths] AS TAIL({NULL: [CurrentMonth].ITEM(0)}, 3)
SELECT
{
min(Tail([LastThreeMonths],3), iif([Measures].[Net sale price] = 0, null, [Measures].[Net sale price]))
} ON COLUMNS
,{
[Product].[Product code].MEMBERS
} ON ROWS
FROM [Sales]
WHERE (
{ [Department].[Department name].&[WRO] }
);
Aşağıdaki hatayı döndürür:
WITH
SET [CurrentMonth] AS StrToMember('[Date].[Calendar].[Month].&[' + FORMAT(Now(), "yyyyMM") + ']')
SET [LastThreeMonths] AS TAIL({NULL: [CurrentMonth].ITEM(0)}, 3)
SELECT
{
(Tail([LastThreeMonths],3), [Measures].[Net sale price])
} ON COLUMNS
,{
[Product].[Product Code].MEMBERS
} ON ROWS
FROM [Sales]
WHERE (
{ [Department].[Department name].&[WRO] }
);
Çalışıyor
Bu
hiç çalışmıyor benim prototip kodudur ama bu istediğim şey değil - son üç ayın her birinde Net satış fiyatını gösteriyor. MDX'de yeni görevlisiyim, lütfen beni aptalca soruları affet.
: İşte çözüm son üç ay her biri için son üç ay içinde _single_ minimum değeri, ya bir _separate_ minimum değeri istiyorsun? Lütfen bunu açıklığa kavuşturmak için soruyu düzenleyin. – SebTHU
@Dodzik, küpün gelecek aylar içermesi gerektiğini düşünüyor muyum? (küplerimiz gelecekteki tarihleri içermez) – whytheq
@whytheq Ne demek istiyorsun? – Dodzik