Advance your Data & AI career with 50 days of live learning, dataviz contests, hands-on challenges, study groups & certifications and more!
Get registeredGet Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Learn more
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,
Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!
Check out the October 2025 Power BI update to learn about new features.