Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.
I want to divide the last month's data but I can't use last month as sometimes we are not able to update for a few months. I came up with this which doesn't work: Partipation_value_month = FILTER(raw,max(raw[Date]) RETURN DIVIDE( CALCULATE(SUM(raw[Value]),raw[Online/TE]="Online"), CALCULATE(SUM(raw[Value]),raw[Online/TE]="TE")) The bit after DIVIDE works for what I want but I don't know how to filter for the last month's read max(raw[Date) works on it's own but how to integrate into this existing measure? Thanks
Hi @mra1984 ,
You need to put filter in the calculate query. You could try this DAX:
DIVIDE ( CALCULATE ( SUM ( raw[Value] ), raw[Online/TE] = "Online", FILTER ( raw, MAX ( raw[Date] ) ) ), CALCULATE ( SUM ( raw[Value] ), raw[Online/TE] = "TE", FILTER ( raw, MAX ( raw[Date] ) ) ) )
Or
A = VAR a = FILTER ( raw, MAX ( raw[Date] ) ) RETURN DIVIDE ( CALCULATE ( SUM ( raw[Value] ), raw[Online/TE] = "Online", a ), CALCULATE ( SUM ( raw[Value] ), raw[Online/TE] = "TE", a ) )
The formula is accepted but nothing is actually being filtered for some reason
Basically I want this measure but for the last month only (via max date) only:
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
110 | |
99 | |
80 | |
64 | |
58 |
User | Count |
---|---|
148 | |
111 | |
93 | |
84 | |
66 |