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! Request now

Reply
Senrsi
Frequent Visitor

Row % with total part of a rolling total

Hey i am just started working with Power BI and i am trying to get a precentage of a row total for a coulumn group that is looking at a time frame.  I had no issues getting this to work for a single month but when i try to replicate this with a timeframe i am hitting a wall.

 

I am usining the DAX code:

Rolling % =
DIVIDE(
CALCULATE(
SUM(MarketShare[Revenue]),FILTER(ALL(MarketShare[Date]),MarketShare[Date] <= MAX(MarketShare[Date]) && MarketShare[Date] >= MAX(MarketShare[Date])-365)),
CALCULATE(
SUM(MarketShare[Revenue]),FILTER(ALL(MarketShare[Date]),MarketShare[Date] <= MAX(MarketShare[Date]) && MarketShare[Date] >= MAX(MarketShare[Date])-365),
ALL(MarketShare[Competitor])
))
 
But the results is returning 100%.  Is there something that i am missing?
 
Current View          
LOCATIONC1C2C3C4C5Total     
L1100050025050010003250     
L2130010005007509004450     
L38008507006009003850     
            
Wanted View          
LOCATIONC1 C2 C3 C4 C5 Total
L11000.0030.8%500.0015.4%250.007.7%500.0015.4%1000.0030.8%3250.00
L21300.0040.0%1000.0030.8%500.0015.4%750.0023.1%900.0027.7%4450.00
L3800.0024.6%850.0026.2%700.0021.5%600.0018.5%900.0027.7%3850.00
4 REPLIES 4
v-lionel-msft
Community Support
Community Support

Hi @Senrsi ,

 

Has your problem been solved?

 

Best regards,
Lionel Chen

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Ashish_Mathur
Super User
Super User

Hi,

In the image that you have shared, there is no mention of any time frame/slicer.  Share the download link of your PBI file where one can clearly see the problem for a slicer selection.  Please also show your expected result.


Regards,
Ashish Mathur
http://www.ashishmathur.com
https://www.linkedin.com/in/excelenthusiasts/
v-lionel-msft
Community Support
Community Support

Hi @Senrsi ,

 

Is this what you want?

v-lionel-msft_0-1621562374385.png

 

Best regards,
Lionel Chen

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Lionel Chen

 

Sorry for the delayed respones.  Your solution does work for me for a single month but the issue i am having is that it is a rolling time frame that is looking back 3 months.  I tried posing my power bi File to show but for some reason i am having issues with my Posting attachments.

To compare it to what you provided my table has four coulmns Location, Date, Attribute, Value

Regards

 

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