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

Grow your Fabric skills and prepare for the DP-600 certification exam by completing the latest Microsoft Fabric challenge.

Reply
newgirl
Helper V
Helper V

Get percentage of total breakdown

Hello

 

I have a sample raw data of the receivables of the business. I'm trying to recreate the 2nd pivot in PBI and get its % breakdown  (which should be divided by the sum of 4,500). However, I'm only getting the 75%-25% breakdown after trying different measures.

 

How do I get the 20%-7% percentage breakdown? Please take note that I have a slicer in the page of the report that would filter the month.

 

Due DateStatusAging (Days)Aging StatusAging PeriodReceivable Amount
5/1/2024Legal6Legal1 to 30                            100
5/1/2024Legal6Legal1 to 30                            200
4/1/2024OK36Past Due31 to 60                            300
5/1/2024OK6Past Due1 to 30                            400
5/1/2024OK6Past Due1 to 30                            500
5/7/2024OK0CurrentCurrent                            600
5/15/2024Legal-8LegalCurrent                            700
5/15/2024OK-8CurrentCurrent                            800
5/15/2024OK-8CurrentCurrent                            900
5/15/2024OK-8CurrentCurrent                         1,000

 

 

 

aging.JPGaging2.JPG

1 ACCEPTED SOLUTION
Jihwan_Kim
Super User
Super User

Hi,

I am not sure how your semantic model looks like, but I tried to create a sample pbix file like below.

Please check the below picture and the attached pbix file, whether it suits your requirement.

 

Jihwan_Kim_0-1715051415220.png

 

Amount sum: = 
SUMX (
    Data,
    CALCULATE (
        SWITCH (
            SELECTEDVALUE ( Data[Status] ),
            "Legal", BLANK (),
            SUM ( Data[Receivable Amount] )
        )
    )
)

 

expected result measure: = 
VAR _total =
    CALCULATE ( [Amount sum:], ALL ( Data[Aging Status], Data[Aging Period] ) )
RETURN
    SUMX (
        Data,
        CALCULATE (
            SWITCH (
                SELECTEDVALUE ( Data[Aging Period] ),
                "Current", BLANK (),
                DIVIDE ( [Amount sum:], _total )
            )
        )
    )

 

If this post helps, then please consider accepting it as the solution to help other members find it faster, and give a big thumbs up.


Go to My LinkedIn Page


View solution in original post

1 REPLY 1
Jihwan_Kim
Super User
Super User

Hi,

I am not sure how your semantic model looks like, but I tried to create a sample pbix file like below.

Please check the below picture and the attached pbix file, whether it suits your requirement.

 

Jihwan_Kim_0-1715051415220.png

 

Amount sum: = 
SUMX (
    Data,
    CALCULATE (
        SWITCH (
            SELECTEDVALUE ( Data[Status] ),
            "Legal", BLANK (),
            SUM ( Data[Receivable Amount] )
        )
    )
)

 

expected result measure: = 
VAR _total =
    CALCULATE ( [Amount sum:], ALL ( Data[Aging Status], Data[Aging Period] ) )
RETURN
    SUMX (
        Data,
        CALCULATE (
            SWITCH (
                SELECTEDVALUE ( Data[Aging Period] ),
                "Current", BLANK (),
                DIVIDE ( [Amount sum:], _total )
            )
        )
    )

 

If this post helps, then please consider accepting it as the solution to help other members find it faster, and give a big thumbs up.


Go to My LinkedIn Page


Helpful resources

Announcements
RTI Forums Carousel3

New forum boards available in Real-Time Intelligence.

Ask questions in Eventhouse and KQL, Eventstream, and Reflex.

MayPowerBICarousel1

Power BI Monthly Update - May 2024

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