Forum Discussion
Anonymous
3 years agoNot applicable
Calculate measure based on month filter from visualization
My visualization will be for filtered for a given month. I need a measure that calculates units x Dates[daysinmonth] x 24 (hours in a day) The daysinmonth needs to be determined based on t...
- Anonymous3 years ago
This solution has not worked for me, even using the MAX in the measure.
v-jingzhang
Community Support
3 years agoHi Anonymous
You can try below measure for [No_of_Days].
No_of_Days = DAY ( EOMONTH ( MAX ( 'Date'[Date] ), 0 ) )
Best Regards,
Community Support Team _ Jing
If this post helps, please Accept it as Solution to help other members find it. Highly appreciate your Kudos!
Anonymous
3 years agoNot applicable
OK,
so I made a copy of my model, deleted my calendar table, and recreated it, added a new column in calendar for daysInMonth, and it is accounting for Leap years in February (Yeah!). So now, the measure that was sent to me works. Of course, I had to adjust ALL my old measures, but a half a day later and it is complete. Thank you for the solution.