Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.
Dear PowerBI Community,
I'm attempting to create a MEASURE to calcultate the number of days in month.
The DAX formula works fine for a single month, but when I add another month from the filter, the formula return blank
I've tried a few combinations here but I'm at a loss.
Thanks for all your help!
DaysinMonth = DAY( EOMONTH(SELECTEDVALUE(DATA[DATE1] ), 0 ))
Hi @delphinecarnet ,
What is your expected output? Total number of days? Average number of days? Minimum? Maximum? We need to know to help you 🙂
Best,
Thanks for your reply!
In this case, I'm expecting 61 which is March + April.
On the left when only April is selected, it does return the correct number of days in the month which is 30 but when I choose an extra month it return blank.
From what I see, you do not have a date table in your model. I would suggest you to first create one, then use the following measure:
DaysinMonth = COUNTROWS( DateTable )
If I answered your question, please mark my post as a solution.
Best,
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
110 | |
109 | |
88 | |
76 | |
66 |
User | Count |
---|---|
126 | |
112 | |
99 | |
82 | |
73 |