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.
Hi all,
The below formula is not giving desired output
Average Gross Margin Last Four Weeks Filter = CALCULATE(
[Total Gross Margin Level 2],
FILTER(ALL(PBIDateTable[Week number]),
PBIDateTable[Week number] <= MAX(PBIDateTable[Week number])-1
&& PBIDateTable[Week number] >= MAX(PBIDateTable[Week number])-4))/4
Hi @Anonymous,
I think max function may break by all function , maybe you can try to use variable function:
Average Gross Margin Last Four Weeks Filter = VAR _current = MAX ( PBIDateTable[Week number] ) RETURN CALCULATE ( [Total Gross Margin Level 2], FILTER ( ALL ( PBIDateTable ), PBIDateTable[Week number] <= _current - 1 && PBIDateTable[Week number] >= _current - 4 ) ) / 4
If above not help, please share some sample data for test.
Regards,
Xiaoxin Sheng
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 |
---|---|
113 | |
100 | |
77 | |
74 | |
49 |
User | Count |
---|---|
146 | |
108 | |
106 | |
90 | |
62 |