Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
YTD should be calculated as per below in the attached qvf:
Header 1 | Header 2 | Header 3 | Header 4 | Header 5 | Header 6 | Header 7 | Header 8 | Header 9 | Header 10 | Header 11 | Header 12 | Header 13 | Header 14 | Header 15 | Header 16 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
May be try this
If(SecondaryDimensionality() = 2, Sum(Aggr(RangeSum(Above(Sum(VALUEs), 0, RowNo())), Region, Country, Year, (Month, (NUMERIC)))), Sum(VALUEs))
Where Month and Year are created in the script like this
LOAD
ID,
Country,
Date(CretaeDATE) as CretaeDATE,
Year(CretaeDATE) as Year,
Month(CretaeDATE) as Month,
Region,
VALUEs
FROM [lib://desktop/Data (1).xlsx]
(ooxml, embedded labels, table is Sheet1);