Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Enhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.

Reply
jfowings1
Regular Visitor

Need help to determine the % of the days in the month "used"

I'm new to power bi and thankful for this community!  I need to create a kpi card that shows how many days have gone by for the current month, shown as a percentage.  Math wise, this is easy.  Today is the 23rd and there are 31 days in the month.  So 22 days have gone by.  22/31 = 70.9%.  I cannot, for the life of me, create the measure to show in the KPI card.  In my date table, I have a measure that shows the number of days in the month.  I created a mesaure that shows yesterday's date. (Now()-1) since I do not want to count today.    I've tried simple division and I get 1% because they want to "count" each measure.  I've tried co-pilot and I got 124%.  Can someone show me what I need, or what I'm doing wrong?  Thanks so much - this forum has been soooo helpful!

1 ACCEPTED SOLUTION
lbendlin
Super User
Super User

What should be the result on the first day of a month?

 

lbendlin_0-1716514279957.png

Measure = 
var lastmonth = EOMONTH(TODAY(),-1)
var thismonth = EOMONTH(TODAY(),0)
return divide(TODAY()-lastmonth-1,thismonth-lastmonth,0)

View solution in original post

4 REPLIES 4
jfowings1
Regular Visitor

Thank you so much!  This did it!  The first day is actually around 3%

No, it's not. Since you are looking at the day before, on the first day you will get 0%.

Correct.  

lbendlin
Super User
Super User

What should be the result on the first day of a month?

 

lbendlin_0-1716514279957.png

Measure = 
var lastmonth = EOMONTH(TODAY(),-1)
var thismonth = EOMONTH(TODAY(),0)
return divide(TODAY()-lastmonth-1,thismonth-lastmonth,0)

Helpful resources

Announcements
July 2025 community update carousel

Fabric Community Update - July 2025

Find out what's new and trending in the Fabric community.

July PBI25 Carousel

Power BI Monthly Update - July 2025

Check out the July 2025 Power BI update to learn about new features.