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

Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Learn more

Reply
scorbin
Helper I
Helper I

How to get a moving total and percent of total based on date?

Right now I have a column with the combined total of another column so I can use that column to get a percentage value. Right now I get results like this: 

scorbin_0-1654552604023.png

Using this method, whenever I move the date slider, the hours change, but the percentages will no longer add up to 100% because those numbers are dividing over the static total column (which has the 903,598). 

 

I was hoping for a better way to get those percentages, one that would include being able to use the date slicer to get a moving total, but still see the results of the percentage be out of 100%. So, if I moved the slicer to show only this last year, the total would be something like 130,000 and each month would divide their amount by 130,000 to get the percentage of that number for that date range. 

1 ACCEPTED SOLUTION
amitchandak
Super User
Super User

@scorbin , if you want to consider filter

Then try % of total like 

 

divide(Sum(Table[Hour]) , Calculate(Sum(Table[Hour]), allselected()) )

 

or Try like - filter of date will be removed

 

divide(Sum(Table[Hour]) , Calculate(Sum(Table[Hour]), all()) )

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

View solution in original post

2 REPLIES 2
amitchandak
Super User
Super User

@scorbin , if you want to consider filter

Then try % of total like 

 

divide(Sum(Table[Hour]) , Calculate(Sum(Table[Hour]), allselected()) )

 

or Try like - filter of date will be removed

 

divide(Sum(Table[Hour]) , Calculate(Sum(Table[Hour]), all()) )

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

That first expression worked! Thanks. Would you have a second to explain why? Does the ALLSELECTED part tell the output to look at filter context? 

Helpful resources

Announcements
Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

October Power BI Update Carousel

Power BI Monthly Update - October 2025

Check out the October 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.

Top Solution Authors