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

Next up in the FabCon + SQLCon recap series: The roadmap for Microsoft SQL and Maximizing Developer experiences in Fabric. All sessions are available on-demand after the live show. Register now

Reply
pbixnewbie
Frequent Visitor

Assign Value of a group to another group with same parent hierarchy

Hi,

 

I would like to get the following output from in my PowerBI Visualization. The below representation is a matrix in my PowerBI Report. The Value column is a measure. The Measure column is the output I'd like to get. 

Essentially, what I'm looking to do is for every customer number, assign the value of Sale Type B to all rows for that Customer Number. Any help would be very much appreciated! 

 

 

Screenshot 2024-07-13 175544.png

 

 

1 ACCEPTED SOLUTION

Please try this:-

Measure = 
CALCULATE(
    [Value],
    FILTER(
        ALL('Table (3)'),
        'Table'[Customer Number] = SELECTEDVALUE('Table'[Customer Number])
            && 'Table'[Sales Type] = "B"
    )
)

Best Regards,
Samarth

If this post helps, please consider accepting it as the solution to help the other members find it more quickly.
Appreciate your Kudos!!
Connect on Linkedin

View solution in original post

3 REPLIES 3
Samarth_18
Community Champion
Community Champion

Hi @pbixnewbie ,

 

You could use the following code:-

 

Measure = 
CALCULATE(
    MAX('Table'[Value]),
    FILTER(
        ALL('Table'),
        'Table'[Customer Number] = SELECTEDVALUE('Table'[Customer Number])
            && 'Table'[Sales Type] = "B"
    )
)

Samarth_18_0-1720874659375.png

 

 

Best Regards,
Samarth

If this post helps, please consider accepting it as the solution to help the other members find it more quickly.
Appreciate your Kudos!!
Connect on Linkedin

Thanks Samarth! I tried this, but the 'Value' field in my table is a Measure itself. Hence, the MAX function doesn't accept it as a parameter. Any suggestions? 

Please try this:-

Measure = 
CALCULATE(
    [Value],
    FILTER(
        ALL('Table (3)'),
        'Table'[Customer Number] = SELECTEDVALUE('Table'[Customer Number])
            && 'Table'[Sales Type] = "B"
    )
)

Best Regards,
Samarth

If this post helps, please consider accepting it as the solution to help the other members find it more quickly.
Appreciate your Kudos!!
Connect on Linkedin

Helpful resources

Announcements
New to Fabric survey Carousel

New to Fabric Survey

If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.

Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.

Join our Fabric User Panel

Join our Fabric User Panel

Share feedback directly with Fabric product managers, participate in targeted research studies and influence the Fabric roadmap.

March Power BI Update Carousel

Power BI Community Update - March 2026

Check out the March 2026 Power BI update to learn about new features.