cancel
Showing results for
Did you mean:

Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and more. Get started

Post Prodigy

Previous month Not working for me

Hey All!

A bit of a weird problem
In a lot of projects I did a month less last month
The formula works great
Just here it does not work for me.

I have a FACT table and a DIM DATE table
that's it
And the Measure are:

Count Person Num = DISTINCTCOUNT('Data HC'[Person Number])
(Which brings me to the number of people in the organization)

Previous month = CALCULATE([Count Person Num],DATEADD('Date'[Date],-1,MONTH))
(That should bring me the previous month but something is wrong with it)
Can you understand why?
She's currently bringing me the same number for the current month

Thanks!

Mark my post as a solution!

1 ACCEPTED SOLUTION
Community Champion

Sounds like only a rookie's mistake. Even if your measure uses previous month as date filter, any other existing date filters in the viz/matrix need to be taken into consideration.

 Thanks to the great efforts by MS engineers to simplify syntax of DAX! Most beginners are SUCCESSFULLY MISLED to think that they could easily master DAX; but it turns out that the intricacy of the most frequently used RANKX() is still way beyond their comprehension! DAX is simple, but NOT EASY!
4 REPLIES 4
Community Champion

Sounds like only a rookie's mistake. Even if your measure uses previous month as date filter, any other existing date filters in the viz/matrix need to be taken into consideration.

 Thanks to the great efforts by MS engineers to simplify syntax of DAX! Most beginners are SUCCESSFULLY MISLED to think that they could easily master DAX; but it turns out that the intricacy of the most frequently used RANKX() is still way beyond their comprehension! DAX is simple, but NOT EASY!
Post Prodigy

shame on me

I played so much with the data
That I did not look at this little thing

Thanks!

Mark my post as a solution!

Super User

PREVIOUSMONTH(<dates>)

Proud to be a Super User!

Post Prodigy

its bring me blank
But I really want to know why it's not going my way
I'm sure I'll find something

Mark my post as a solution!

Announcements

Europe’s largest Microsoft Fabric Community Conference

Join the community in Stockholm for expert Microsoft Fabric learning including a very exciting keynote from Arun Ulag, Corporate Vice President, Azure Data.

Power BI Monthly Update - August 2024

Check out the August 2024 Power BI update to learn about new features.

Fabric Community Update - August 2024

Find out what's new and trending in the Fabric Community.

Top Solution Authors
Top Kudoed Authors