Earn the coveted Fabric Analytics Engineer certification. 100% off your exam for a limited time only!
Hi all,
I have two tables. A date table (Date) and Shipping table (table 0). In the shipping table I am calculating the a 12 month rolling sum and then trying to take a MAX value of that measure. I am using the formula below
Max12M = CALCULATE
(MAXX
(SUMMARIZECOLUMNS(Date2[YearMonthnumber]),
CALCULATE(
SUM('Table 0'[LBS SHIPPED]))),
DATESINPERIOD(Date2[Date],
LASTDATE(Date2[Date]),
-11,MONTH))
It worked fine until now, and by selecting the 'Year' slicer from the date table I could look at the rolling sums and a Max value of the last 12 months. But since Jan 2019, It is giving me a blank result as out put for Max value. But If I select the 'month' as a slicer it is doing the math (see attached). I am not sure why this is happening. Any thoughts?
Solved! Go to Solution.
I figured it out. Thanks for the response.
The LASTDATE[Date2(Date)] was picking up the last date of 2019 (i.e 31 Dec 2019, I think). I changed that to the datefield from the fact table and it picked up the LastDate of the filter context.
Hi @Anonymous,
But since Jan 2019, It is giving me a blank result as out put for Max value. But If I select the 'month' as a slicer it is doing the math (see attached).
Did you mean since Jan 2019, the measure didn't work as before while you didn't make any change to the report? Is there any update to the data records of date table and Shipping table? If possible, could you share your sample .pbix file for test?
Regards,
Yuliana Gu
I figured it out. Thanks for the response.
The LASTDATE[Date2(Date)] was picking up the last date of 2019 (i.e 31 Dec 2019, I think). I changed that to the datefield from the fact table and it picked up the LastDate of the filter context.
User | Count |
---|---|
140 | |
113 | |
104 | |
76 | |
63 |
User | Count |
---|---|
135 | |
126 | |
110 | |
70 | |
61 |