Forum Discussion
DAX Applying Measure in Current Month
Wow, did I write that measure?! Sorry about that.
Try this
=
CALCULATE (
COUNTROWS ( V_F_ASSETS ),
FILTER ( ALL ( calendar ), calendar[monthID] = MAX ( calendar[monthID] ) )
)
MattAllington wrote:Wow, did I write that measure?! Sorry about that.
Try this
=
CALCULATE (
COUNTROWS ( V_F_ASSETS ),
FILTER ( ALL ( calendar ), calendar[monthID] = MAX ( calendar[monthID] ) )
)
MattAllington
I fully agree with your approach!
But this one replicate my 1st measure behaviour when i don't select any month in the slicer i.e. it works on a card visualization (Aggregated data), but it doesn't work when I use it on a table with any other dimension.
The reason is the same, it doesn't return the data for MaxMonth, it returns the MaxMonth data for each specific dimension value. So in some cases instead of return 0 to June data, the measure is returning 2 assets in May.
Thanks.