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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
amirghaderi
Helper IV
Helper IV

Running total percentage with filter

I want to create a running total percentage of a column with filter.

Example:

I want to get the percentage of Hour column when I filter on a project on that period. The total percentage should always sum at 100% (Cumulative percentage on filtered project/projects).

 

Hour

Project

22-Jun-19

2

A

29-Jun-19

4

A

6-Jul-19

6

B

13-Jul-19

8

A

20-Jul-19

9

B

27-Jul-19

10

C

3-Aug-19

2

C

 

Appreciate, if anybody can help. Read a lot of posts and not able to find a soloution

1 ACCEPTED SOLUTION

Hi , @amirghaderi 

Try to use the following measure :

Percentage = CALCULATE(SUM('Table'[Hour]),FILTER(ALLSELECTED('Table'),'Table'[Date]<=MIN('Table'[Date])))/CALCULATE(SUM('Table'[Hour]),ALLSELECTED('Table'))

Here is a  demo URL .

It shows as below:

73.png

 

Best Regards,
Community Support Team _ Eason
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

 

 

View solution in original post

6 REPLIES 6
joglidden2
Post Patron
Post Patron

This worked. Not exactly sure how, but it did. Note to self: better formatting...

_Running % total =
    //Numerator
    CALCULATE(
        SUM(SITE_footprint_all[Reported Revenue]),
        FILTER(
            ALLSELECTED(SITE_footprint_all),
            //Flip to > to make it descending
            SITE_footprint_all[Reported Revenue]>=MIN(SITE_footprint_all[Reported Revenue])
            )
        )
    //Divided by
    /
    //Denominator
    CALCULATE(
        SUM(SITE_footprint_all[Reported Revenue]), ALLSELECTED(SITE_footprint_all)
        )
v-easonf-msft
Community Support
Community Support

Hi , @amirghaderi 

According to your description ,you can try measures as below:

 

Sum hour By Project = CALCULATE(SUM('Table'[Hour]),ALLEXCEPT('Table','Table'[Project]))
Percentage = SUM('Table'[Hour])/'Table'[Sum hour By Project]

 

Here is a sample I made:

 

 

aa.png

 

 

URL: https://wicren-my.sharepoint.com/:u:/g/personal/michael_wicren_onmicrosoft_com/ERoAec_Fkv5PgIu6TTq5u...

Best Regards,
Community Support Team _ Eason
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Thanks for the response. But, the soloution does not work as I need to show the output as line curve in the chart. Maybe below screen shot show the problem better.Capture3.JPG

Maybe explaining it in more detail.

In the screenshot, EVFC% should be 100% at the end of graph for any filter (filter by project in this case, it may have multiple filter). It only goes to 100%, when there is no filter.

Hi , @amirghaderi 

Try to use the following measure :

Percentage = CALCULATE(SUM('Table'[Hour]),FILTER(ALLSELECTED('Table'),'Table'[Date]<=MIN('Table'[Date])))/CALCULATE(SUM('Table'[Hour]),ALLSELECTED('Table'))

Here is a  demo URL .

It shows as below:

73.png

 

Best Regards,
Community Support Team _ Eason
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

 

 

Thank you. It worked!

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

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