cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
vviera
New Member

Help needed for DAX formula to calculate percentage by certain group

Hello,

 

Total newbie here. I'm looking to add a card visual that displays the percentage of certain aging bucket groups and status subcategories. While i have it listed out in the matrix table below, i was hoping to visualize it in a simple card at the top of the report.

 

I'm specifically looking to just calculate 121-150, 151-180, and >180 aging buckets and only the "Carrier Action Needed, WR Action Needed, and Not Worked" subcategories within those buckets to get a percentage from the grand total of balance due ($35,497,566.55) to show how much impact it overall.

 

I am so grateful for any assistance!

 

Here is a matrix table to show more details:

vviera_0-1684777926440.png

 

1 ACCEPTED SOLUTION
v-zhangti
Community Support
Community Support

Hi, @vviera 

 

You can try the following methods.

 

Measure = 
VAR _N1 = CALCULATE ( SUM ( 'Table'[BALANCE DUE] ), ALL ( 'Table' ) )
VAR _N2 =
    CALCULATE ( SUM ( 'Table'[BALANCE DUE] ),
        FILTER ( ALLEXCEPT ( 'Table', 'Table'[AGING BUCKET] ),
            [Type] IN { "Carrier Action Needed", "WR Action Needed", "Not Worked" } ) )
RETURN
    DIVIDE ( _N2, _N1 )

 

vzhangti_0-1684896282694.png

vzhangti_1-1684896303216.png

Is this the result you expect?

 

Best Regards,

Community Support Team _Charlotte

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

1 REPLY 1
v-zhangti
Community Support
Community Support

Hi, @vviera 

 

You can try the following methods.

 

Measure = 
VAR _N1 = CALCULATE ( SUM ( 'Table'[BALANCE DUE] ), ALL ( 'Table' ) )
VAR _N2 =
    CALCULATE ( SUM ( 'Table'[BALANCE DUE] ),
        FILTER ( ALLEXCEPT ( 'Table', 'Table'[AGING BUCKET] ),
            [Type] IN { "Carrier Action Needed", "WR Action Needed", "Not Worked" } ) )
RETURN
    DIVIDE ( _N2, _N1 )

 

vzhangti_0-1684896282694.png

vzhangti_1-1684896303216.png

Is this the result you expect?

 

Best Regards,

Community Support Team _Charlotte

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

 

Helpful resources

Announcements
PBI Sept Update Carousel

Power BI September 2023 Update

Take a look at the September 2023 Power BI update to learn more.

Learn Live

Learn Live: Event Series

Join Microsoft Reactor and learn from developers.

Dashboard in a day with date

Exclusive opportunity for Women!

Join us for a free, hands-on Microsoft workshop led by women trainers for women where you will learn how to build a Dashboard in a Day!

MPPC 2023 PBI Carousel

Power Platform Conference-Power BI and Fabric Sessions

Join us Oct 1 - 6 in Las Vegas for the Microsoft Power Platform Conference.

Top Solution Authors
Top Kudoed Authors