Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.
Hello,
I face an issue with a measure (called PreviewCumul).
This is the context :
The [Preview] is a measure corresponding to the [Realized] column if MONTH([Date]) <= 2, else [Provisional] column
Preview =
VAR MonthCount = 2
RETURN
IF(
MAX(Dates[MoisNum]) <= MonthCount,
SUMX(
'Table1',
Table1[Realized]
),
SUMX(
'Table2',
Table2[Provisional]
)
)
My problem then concerns the [PreviewCumul] measure that does the running total of [Preview]
PreviewCumul =
CALCULATE(
[Preview],
FILTER(
CALCULATETABLE(
SUMMARIZE('Dates', 'Dates'[AnnéeMoisTri], 'Dates'[engDate]),
ALLSELECTED('Dates')
),
ISONORAFTER(
'Dates'[AnnéeMoisTri], MAX('Dates'[AnnéeMoisTri]), DESC,
'Dates'[engDate], MAX('Dates'[engDate]), DESC
)
)
)
As we can see in the table screenshot above, the problem is that as from month number 3 it sums the values of [provisional] only from the beginning of the year instead of summing [Preview] values.
Does anyone have an idea of a clean way to solve it ?
Thanks in advance.
Best regards,
Cado
Solved! Go to Solution.
@Cado_one , You need to try measure like
calculate(Sumx(Values('Date'[Month Year]), [Preview]),filter(all('Date'),'Date'[date] <=max('Date'[date])))
or
calculate(Sumx(Values('Date'[Month Year]), [Preview]),filter(allselected('Date'),'Date'[date] <=max('Date'[date])))
@Cado_one , You need to try measure like
calculate(Sumx(Values('Date'[Month Year]), [Preview]),filter(all('Date'),'Date'[date] <=max('Date'[date])))
or
calculate(Sumx(Values('Date'[Month Year]), [Preview]),filter(allselected('Date'),'Date'[date] <=max('Date'[date])))
User | Count |
---|---|
106 | |
89 | |
81 | |
76 | |
73 |
User | Count |
---|---|
112 | |
104 | |
96 | |
74 | |
66 |