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

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
Newbie_1_Kenobi
New Member

Daily total divided by monthly total

I am not having any luck finding an answer so I am not sure if this is even doable. My problem is twofold. My first issue is I am trying to get a weighted average for a total with a filter (so I am using a measure). I am trying to divide the prior year daily total by the prior year monthly total for each month for each filtered category. For example, $1904/$30823 = .061, $1685/$30823 = .054, so on and so on. 

Newbie_1_Kenobi_1-1680138044759.png

 

I then need to multiply those percents against one entry on the first of each month that is the target. So I was only given one amount for the whole of January, $29,722. I need to arrive at a daily amount by multiplying the .061 x $29,722 for Jan 1, .054 x $29,722 for Jan 2 and so on and so on. 

 

Is this feasibile?

1 REPLY 1
PiEye
Resolver II
Resolver II

Hi @Newbie_1_Kenobi 

 

This is complicated at first glance, but breaking the measures in steps makes it a lot simpler. 

 

PiEye_0-1680175213834.png

 

I assume you already have expressions to return the latest year, and previous year.

 

First steps are to work out the daily amounts for the current / previous year and then use that expression to get the total for the month:

 

exp current yr = CALCULATE([Exp],FILTER(Table1,Table1[year]=[Latest Selected Year]))
exp prev yr = CALCULATE([Exp],FILTER(Table1,Table1[year]=[Prev Year]))

 

month total current yr = CALCULATE([exp current yr],ALLEXCEPT(Table1,Table1[month]))
month total prev yr = CALCULATE([exp prev yr],ALLEXCEPT(Table1,Table1[month]))
"All except" means ignore all filters (including days), except for month. So we get a month "total" 
 
I can then use these expressions to work out the day as a % of the month:
day % of month curr = [exp current yr]/[month total current yr]
day % of month prev = [exp prev yr]/[month total prev yr]
 
To return the total of the target for the month, use a similar syntax to the month total:
CALCULATE(sum(Table1[Target]),ALLEXCEPT(Table1,Table1[month]))
 
We can then apply this to the daily % to get a daily target for that day of the month:
Prev yr pc X Month Tgt = [day % of month prev] * CALCULATE(sum(Table1[Target]),ALLEXCEPT(Table1,Table1[month]))
 
HTH
 
Pi

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

November Power BI Update Carousel

Power BI Monthly Update - November 2025

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

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.