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

Be one of the first to start using Fabric Databases. View on-demand sessions with database experts and the Microsoft product team to learn just how easy it is to get started. Watch now

Reply
Anonymous
Not applicable

Can you minus rows in a matrix visualisation?

Hi All,

 

Based on a dataset with 3 pivoted columns "Product", "date", "price" I created the following matrix. Both product 1 and product 2 (and others) have multiple rows in the imported dataset. So are not unique values. They are registered per sale. I created a matrix by putting product in the row, date in the columns and price in the values. This is exactly what I wanted to see. However, I also would like to see the result of prod 1 minus prod 2 for each month. If it is not possible in the matrix below I don't mind creating an extra one just for this. But I have no idea how to do this since the prices and product names are in the same column. This means a measure like AVERAGE(table[price]) - AVERAGE(table[price]) will not work, as this results in all 0's. 

 

commodity_check_0-1618575783554.png

So how can I see the result of prod 1 minus prod 2 for each month? 

 

Kind regards,

commodity_check

1 ACCEPTED SOLUTION

@Anonymous , You will need one/two independent product table 

refer how this done for dates/period 

https://youtu.be/44fGGmg9fHI

Join us as experts from around the world come together to shape the future of data and AI!
At the Microsoft Analytics Community Conference, global leaders and influential voices are stepping up to share their knowledge and help you master the latest in Microsoft Fabric, Copilot, and Purview.
️ November 12th-14th, 2024
 Online Event
Register Here

View solution in original post

4 REPLIES 4
amitchandak
Super User
Super User

@Anonymous , You have to try a measure like

 

AVERAGEX(filter(allselected(Table[product]) ,Table[product] = "Prod 1") ,table[price]) - AVERAGEX(filter(allselected(Table[product]) ,Table[product] = "Prod 1") ,table[price])

Join us as experts from around the world come together to shape the future of data and AI!
At the Microsoft Analytics Community Conference, global leaders and influential voices are stepping up to share their knowledge and help you master the latest in Microsoft Fabric, Copilot, and Purview.
️ November 12th-14th, 2024
 Online Event
Register Here
Anonymous
Not applicable

Hi @amitchandak ,

Would it be possible to make Product dynamic? Instead of typing "Prod 1"? I do have a unique key for every line. 

Hi @Anonymous ,

 

Could you pls provide your expected output in details?

 

Best Regards,
Kelly

Did I answer your question? Mark my post as a solution!

@Anonymous , You will need one/two independent product table 

refer how this done for dates/period 

https://youtu.be/44fGGmg9fHI

Join us as experts from around the world come together to shape the future of data and AI!
At the Microsoft Analytics Community Conference, global leaders and influential voices are stepping up to share their knowledge and help you master the latest in Microsoft Fabric, Copilot, and Purview.
️ November 12th-14th, 2024
 Online Event
Register Here

Helpful resources

Announcements
Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!

Dec Fabric Community Survey

We want your feedback!

Your insights matter. That’s why we created a quick survey to learn about your experience finding answers to technical questions.

ArunFabCon

Microsoft Fabric Community Conference 2025

Arun Ulag shares exciting details about the Microsoft Fabric Conference 2025, which will be held in Las Vegas, NV.

December 2024

A Year in Review - December 2024

Find out what content was popular in the Fabric community during 2024.