The ultimate Fabric, Power BI, SQL, and AI community-led learning event. Save €200 with code FABCOMM.
Get registeredEnhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.
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!
Solved! Go to Solution.
What should be the result on the first day of a month?
Measure =
var lastmonth = EOMONTH(TODAY(),-1)
var thismonth = EOMONTH(TODAY(),0)
return divide(TODAY()-lastmonth-1,thismonth-lastmonth,0)
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.
What should be the result on the first day of a month?
Measure =
var lastmonth = EOMONTH(TODAY(),-1)
var thismonth = EOMONTH(TODAY(),0)
return divide(TODAY()-lastmonth-1,thismonth-lastmonth,0)
User | Count |
---|---|
25 | |
12 | |
8 | |
8 | |
5 |
User | Count |
---|---|
28 | |
13 | |
12 | |
12 | |
6 |