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

Level up your Power BI skills this month - build one visual each week and tell better stories with data! Get started

Reply
Anonymous
Not applicable

How to display two calculated columns in matrix

Hi Team,

 

Could you please help me on below scenorio.

I have created the DAX function by using SWITCH function.please find the DAX column below.

When i use below calculation in Matrix, its summing up the values as State level and giving it in one column, but i need it in two columns, like Florida and Books combination value as one column and Florida and Chairs combination value as in different column.

Dataset

dataset.png

 

Formula

Measure1 = SWITCH(TRUE(), Table[State] = "Florida" && Table[Category] = "Books" , Table[Sales]),

Table[State] = "Florida" && Table[Category] = "Chairs" , Table[Sales])

 

When i use above formula it is giving result like below.

 Florida
Measure1300

 

But i require something like this.(Column names just for reference)

 Florida+BooksFlorida+Chairs
Measure1100200

 

Kindly help me with this requirement.

1 ACCEPTED SOLUTION
Mariusz
Community Champion
Community Champion

Hi @Anonymous 

 

Not sure if I understand your requirement but I think you can create an extra column in your table that concatenates state and category and later use it as Matrix column.

New Column = table[state] & "-" & table[Category]

 

Best Regards,
Mariusz

If this post helps, then please consider Accepting it as the solution.

Please feel free to connect with me.
LinkedIn

 

View solution in original post

2 REPLIES 2
Mariusz
Community Champion
Community Champion

Hi @Anonymous 

 

Not sure if I understand your requirement but I think you can create an extra column in your table that concatenates state and category and later use it as Matrix column.

New Column = table[state] & "-" & table[Category]

 

Best Regards,
Mariusz

If this post helps, then please consider Accepting it as the solution.

Please feel free to connect with me.
LinkedIn

 

amitchandak
Super User
Super User

@Anonymous , both case you are returning sales , so no diff. Either you need two columns or Segmentation

 

https://www.daxpatterns.com/dynamic-segmentation/
https://www.daxpatterns.com/static-segmentation/
https://www.poweredsolutions.co/2020/01/11/dax-vs-power-query-static-segmentation-in-power-bi-dax-po...

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

Helpful resources

Announcements
April Power BI Update Carousel

Power BI Monthly Update - April 2026

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

Fabric SQL PBI Data Days

Data Days 2026 coming soon!

Sign up to receive a private message when registration opens and key events begin.

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.