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
brownrobm
Frequent Visitor

Filter by aggregate value, and then summarize by a different column

I am attepting to create a measure that will identify people who have claims > $50k and then group those claims by another dimension. 

 

Claims  
MemberTypeAmount
1A25000
1B26000
2A50000
3A15000

 

Type 
TypeDescription
AClaim type A
BClaim type B

 

My measure is defined as:

High Claimant Count = 

Calculate ([Distinct Member Count],

    FILTER (Values('Member'[ID]), Amount > 50000))

 

This works, until the Type Description is added to the query. Once that happens, Person 1 drops out of the result set because no one category exceeds 50k. What I need to do is sum up the values but still be able to show the sum total for the claim types for people who exceed 50k.

 

I feel like I am missing something very simple here.

 

Desired results 
TypeAmountPerson Count
A750002
B260001
1 ACCEPTED SOLUTION
v-shex-msft
Community Support
Community Support

HI @brownrobm,

 

You can try to use below formula to create new table with specific summary conditions:

Summary Table =
VAR list =
    CALCULATETABLE (
        VALUES ( 'Member'[ID] ),
        FILTER ( ALL ( 'Member' ), [Amount] > 50000 )
    )
RETURN
    SUMMARIZE (
        FILTER ( T1, [Member] IN list ),
        [Type],
        "Desc", LOOKUPVALUE ( T2[Description], T2[Type], [Type] ),
        "Amount", SUM ( T1[Amount] ),
        "Person", COUNTROWS ( VALUES ( T1[Member] ) )
    )

 

Regards,

Xiaoxin Sheng

Community Support Team _ Xiaoxin
If this post helps, please consider accept as solution to help other members find it more quickly.

View solution in original post

1 REPLY 1
v-shex-msft
Community Support
Community Support

HI @brownrobm,

 

You can try to use below formula to create new table with specific summary conditions:

Summary Table =
VAR list =
    CALCULATETABLE (
        VALUES ( 'Member'[ID] ),
        FILTER ( ALL ( 'Member' ), [Amount] > 50000 )
    )
RETURN
    SUMMARIZE (
        FILTER ( T1, [Member] IN list ),
        [Type],
        "Desc", LOOKUPVALUE ( T2[Description], T2[Type], [Type] ),
        "Amount", SUM ( T1[Amount] ),
        "Person", COUNTROWS ( VALUES ( T1[Member] ) )
    )

 

Regards,

Xiaoxin Sheng

Community Support Team _ Xiaoxin
If this post helps, please consider accept as solution to help other members find it more quickly.

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.