Forum Discussion
Previous Month Dax not working
Hi, Im new to Power BI so looking for help.
Im trying to create a table to show current headcount, Previous Headcount and the difference between,by month. I also have a seperate filter with a month field. The previous month Dax is working but when i Filter by month, example for August the table shows Augut Headcount figures and September previous month figures. I need it to show the month filtered and the previous month.
PrevMonth= CALCULATE (count(headcount[count month]), PREVIOUSMONTH(Headcount[month][date]))
Any ideas what i am doing wrong?
Thank you in advance
Coud you telle us more about your tables and visuals you're using ?
Most time intelligence functions requires a date table to work properly, do you have one ?
5 Replies
- AilleryO
Memorable Member
Hi,
You should close your parenthesis after the COUNT function :
PrevMonth= CALCULATE ( count( headcount[count month] ) , PREVIOUSMONTH( Headcount[month][date] ) )
Hope it helps
- AilleryO
Memorable Member
Coud you telle us more about your tables and visuals you're using ?
Most time intelligence functions requires a date table to work properly, do you have one ?
- ShelRoseFrequent Visitor
Thats my table and FIlter. See the way Septemeber is showing when i only filter August. No i dont have a date table, i will create one and see if that works