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

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
smpa01
Super User
Super User

Matrix Manipulation

I have a matrix which returns this

smpa01_0-1714352819412.png

But I want to manipulate in such a way so that it brings only {factTwo} for month1  and {factOne,factTwo} for  month2. My desired output is below

month 1 2 2
category factTwo factOne factTwo
cat3                  14,021                       621                  14,021
cat4                  14,021                       621                  14,021

 

I tried to achieve this with Tabular Editor but I caould not make it work. Is it possible to achieve?

Thank you in advance.

@parry2k @bcdobbs 

Did I answer your question? Mark my post as a solution!
Proud to be a Super User!
My custom visualization projects
Plotting Live Sound: Viz1
Beautiful News:Viz1, Viz2, Viz3
Visual Capitalist: Working Hrs
1 ACCEPTED SOLUTION
parry2k
Super User
Super User

@smpa01 you can easily achieve this with calculation groups.

 

here is a high level of how you will do it, assuming you have two measures called "Measure Fact 1" and "Measure Fact 2"

 

- create a calculation group with two calculation items, let's call those fact 1 and fact 2

- in fact 1 calculation item, you will check if the selected value = month 1 then return blank else return "measure fact 1"

- in fact 2 you will always return "measure fact 2"

 

on matrix visual:

 

- category on rows

- month and column from new calculation group 

- in value, use any one measure

 

Please try and let me know if you run into any issues.

 

Cheers!



Subscribe to the @PowerBIHowTo YT channel for an upcoming video on List and Record functions in Power Query!!

Learn Power BI and Fabric - subscribe to our YT channel - Click here: @PowerBIHowTo

If my solution proved useful, I'd be delighted to receive Kudos. When you put effort into asking a question, it's equally thoughtful to acknowledge and give Kudos to the individual who helped you solve the problem. It's a small gesture that shows appreciation and encouragement! ❤


Did I answer your question? Mark my post as a solution. Proud to be a Super User! Appreciate your Kudos 🙂
Feel free to email me with any of your BI needs.

View solution in original post

2 REPLIES 2
parry2k
Super User
Super User

@smpa01 you can easily achieve this with calculation groups.

 

here is a high level of how you will do it, assuming you have two measures called "Measure Fact 1" and "Measure Fact 2"

 

- create a calculation group with two calculation items, let's call those fact 1 and fact 2

- in fact 1 calculation item, you will check if the selected value = month 1 then return blank else return "measure fact 1"

- in fact 2 you will always return "measure fact 2"

 

on matrix visual:

 

- category on rows

- month and column from new calculation group 

- in value, use any one measure

 

Please try and let me know if you run into any issues.

 

Cheers!



Subscribe to the @PowerBIHowTo YT channel for an upcoming video on List and Record functions in Power Query!!

Learn Power BI and Fabric - subscribe to our YT channel - Click here: @PowerBIHowTo

If my solution proved useful, I'd be delighted to receive Kudos. When you put effort into asking a question, it's equally thoughtful to acknowledge and give Kudos to the individual who helped you solve the problem. It's a small gesture that shows appreciation and encouragement! ❤


Did I answer your question? Mark my post as a solution. Proud to be a Super User! Appreciate your Kudos 🙂
Feel free to email me with any of your BI needs.

@parry2k  this is so awesome; worked like a charm. Thanks for the help.

 

I wasted a lot of time today trying to figure this out on my own.

 

Thanks a lot again for saving the rest of the day.

Did I answer your question? Mark my post as a solution!
Proud to be a Super User!
My custom visualization projects
Plotting Live Sound: Viz1
Beautiful News:Viz1, Viz2, Viz3
Visual Capitalist: Working Hrs

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

December 2025 Power BI Update Carousel

Power BI Monthly Update - December 2025

Check out the December 2025 Power BI Holiday Recap!

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.