Don't miss your chance to take the Fabric Data Engineer (DP-600) exam for FREE! Find out how by watching the DP-600 session on-demand now through April 28th.
Learn moreJoin the FabCon + SQLCon recap series. Up next: Power BI, Real-Time Intelligence, IQ and AI, and Data Factory take center stage. All sessions are available on-demand after the live show. Register now
Afternoon,
I have 2 measures that calculate if one is above or below the other.
I can get this far but for some reason it wont total the 'Movement (Up)' or Movement(Down) measures and the 'Movement (Up)' is counting all rows not just the ones that match the criteria.
Movement (Down) =
Var _Current = CALCULATE(Average('Table1'[Result]),FILTER('Table1','Table1'[Collection]="Current"))
Var _Previous = CALCULATE(Average('Table1'[Result]),REMOVEFILTERS('Table1'[Collection]),'Table1'[Collection]=("Previouse"))
RETURN
CONVERT(CALCULATE(COUNTA('Table1'[Anon]),FILTER('Table1',_Current>_Previous)),INTEGER)
Example data
Table1
| Anon | Result | Collection |
| Pupil 3281 | 28 | Current |
| Pupil 3456 | 60 | Current |
| Pupil 3508 | 28 | Current |
| Pupil 3509 | 26 | Current |
| Pupil 3592 | 39 | Current |
| Pupil 3606 | 50 | Current |
| Pupil 3628 | 28 | Current |
| Pupil 3635 | 13 | Current |
| Pupil 3671 | 69 | Current |
| Pupil 3753 | 54 | Current |
| Pupil 3815 | 64 | Current |
| Pupil 3827 | 35 | Current |
| Pupil 3828 | 58 | Current |
| Pupil 3881 | -27 | Current |
| Pupil 3912 | 54 | Current |
| Pupil 3918 | 26 | Current |
| Pupil 3954 | -93 | Current |
| Pupil 3969 | 72 | Current |
| Pupil 3998 | 20 | Current |
| Pupil 4031 | -42 | Current |
| Pupil 4114 | 67 | Current |
| Pupil 4338 | 27 | Current |
| Pupil 4369 | 33 | Current |
| Pupil 4462 | 83 | Current |
| Pupil 3309 | -3 | Current |
| Pupil 3330 | -46 | Current |
| Pupil 3725 | 3 | Current |
| Pupil 4236 | Current | |
| Pupil 4450 | 34 | Current |
| Pupil 4464 | 10 | Current |
| Pupil 3281 | -1 | Previouse |
| Pupil 3456 | 43 | Previouse |
| Pupil 3508 | 23 | Previouse |
| Pupil 3509 | -5 | Previouse |
| Pupil 3592 | 29 | Previouse |
| Pupil 3606 | 36 | Previouse |
| Pupil 3628 | 13 | Previouse |
| Pupil 3635 | -11 | Previouse |
| Pupil 3671 | 28 | Previouse |
| Pupil 3753 | 16 | Previouse |
| Pupil 3815 | 61 | Previouse |
| Pupil 3827 | 34 | Previouse |
| Pupil 3828 | 22 | Previouse |
| Pupil 3881 | -46 | Previouse |
| Pupil 3912 | 48 | Previouse |
| Pupil 3918 | -2 | Previouse |
| Pupil 3954 | -105 | Previouse |
| Pupil 3969 | 54 | Previouse |
| Pupil 3998 | 6 | Previouse |
| Pupil 4031 | -65 | Previouse |
| Pupil 4114 | 42 | Previouse |
| Pupil 4338 | 16 | Previouse |
| Pupil 4369 | -44 | Previouse |
| Pupil 4462 | 72 | Previouse |
| Pupil 3309 | 3 | Previouse |
| Pupil 3330 | -36 | Previouse |
| Pupil 3725 | 37 | Previouse |
| Pupil 4236 | 57 | Previouse |
| Pupil 4450 | 37 | Previouse |
| Pupil 4464 | 34 | Previouse |
Solved! Go to Solution.
Hi @CEllis ,
I create a table as you mentioned.
Maybe I think you can use this calculated column, here is the DAX code.
Column = IF('Table'[Current]>'Table'[Previous],"Current","Previous")
Best Regards
Yilong Zhou
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi @CEllis ,
I create a table as you mentioned.
Maybe I think you can use this calculated column, here is the DAX code.
Column = IF('Table'[Current]>'Table'[Previous],"Current","Previous")
Best Regards
Yilong Zhou
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
@CEllis First, please vote for this idea: https://ideas.powerbi.com/ideas/idea/?ideaid=082203f1-594f-4ba7-ac87-bb91096c742e
This looks like a measure totals problem. Very common. See my post about it here: https://community.powerbi.com/t5/DAX-Commands-and-Tips/Dealing-with-Measure-Totals/td-p/63376
Also, this Quick Measure, Measure Totals, The Final Word should get you what you need:
https://community.powerbi.com/t5/Quick-Measures-Gallery/Measure-Totals-The-Final-Word/m-p/547907
Also: https://youtu.be/uXRriTN0cfY
And: https://youtu.be/n4TYhF2ARe8
Check out the April 2026 Power BI update to learn about new features.
If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.
A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.
| User | Count |
|---|---|
| 6 | |
| 6 | |
| 4 | |
| 2 | |
| 2 |
| User | Count |
|---|---|
| 21 | |
| 10 | |
| 8 | |
| 7 | |
| 6 |