Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.
Hello,
Im using the following measure for a gauge to show the percentage of all runs of that month under 10 hours. This I do on a monthly base, so for januari i divide by 31.
The gauge is on a page with different visuals, and Im using a filter to select the month that I want
How can I make this that it calculates the numbers of days in a month automatically, instead of putting a hard coded value in the measure?
Solved! Go to Solution.
Hi @TechR21
Since you have a date filter, use the same date column in the variable:
VAR __DaysInMonth = 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.
@TechR21 You could do something like this:
VAR __DaysInMonth = DAY(EOMONTH(TODAY(),0))
I see its not the correct percentage when i look for the data of januari. Is this because the today part in the measure?
VAR __DaysInMonth = DAY(EOMONTH(TODAY(),0))
for januari i have 16 days of the 31 that are below 10 hours, so I get a percentage of 51.61, but the gauge shows
On the filter I selected all days of januari so this should be the range of calculation. If I select all the days of feb at the end of this month, I want the measure to show the percentage based on the days in feb
Hi @TechR21
Since you have a date filter, use the same date column in the variable:
VAR __DaysInMonth = 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.
User | Count |
---|---|
102 | |
88 | |
78 | |
71 | |
69 |
User | Count |
---|---|
113 | |
99 | |
97 | |
72 | |
68 |