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

Vote for your favorite vizzies from the Power BI Dataviz World Championship submissions. Vote now!

Reply
Anonymous
Not applicable

Split a column based on category

Hello!
I just uploaded this question but i didn't label it correctly and I think it got lost in the flow. 

I have a table that looks like this:

einarrattgard_0-1629366983844.png

 

The price of something will be (one of the "HRR" + one of the "Turn")

The prices are calculated for each alternative via a measure. 

Im thinking something like this:

 

 

 

 

 

Price =
Calculate(
    [Price Measure],
    Filter(
        'Table',
        'Table'[HRR or Turn] = "HRR"
    )
)
+ Calculate(
    [Price Measure],
    Filter(
        'Table',
        'Table'[HRR or Turn] = "Turn"
    )
)

 

 

 

 

 

My question is how do i display this in a table?

I want: 

HRRHRR PriceTurnTurn PriceTotal Price
Ovako12345Leax1234598765

with all alternatives. (2x3)

einarrattgard_0-1629371346642.png

 


Do you have any suggestions on how I can either change the layout of the data so that it is easily done or how can model my data/measures?

1 REPLY 1
AllisonKennedy
Community Champion
Community Champion

@Anonymous  Where does price measure come from please? You may need to use a CROSSJOIN to get all options or split your data into two unrelated tables - one table for HRR and another table for Turn. Each table should have the Product Code and the option (HRR or TURN). Then you'll relate these to the DimProduct table and you should be able to create a visual using your already existing [Price Measure] (depending on how that's calculated).

 

Can you paste sample data as a table format (raw data, as separate tables if that's how they come in, and including the price)


Please @mention me in your reply if you want a response.

Copying DAX from this post? Click here for a hack to quickly replace it with your own table names

Has this post solved your problem? Please Accept as Solution so that others can find it quickly and to let the community know your problem has been solved.
If you found this post helpful, please give Kudos C

I work as a Microsoft trainer and consultant, specialising in Power BI and Power Query.
www.excelwithallison.com

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

Vote for your favorite vizzies from the Power BI World Championship submissions!

Sticker Challenge 2026 Carousel

Join our Community Sticker Challenge 2026

If you love stickers, then you will definitely want to check out our Community Sticker Challenge!

January Power BI Update Carousel

Power BI Monthly Update - January 2026

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

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.