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
FrancoGR
New Member

DAX - Multiply filtered row by multiple columns and show in visualization

Hi, please your help. I've been trying to combine in a matrix report:

1. Table A. each row represent a task and, de type of distribution (this is variable) and the cost of the task

2. Table B. The kind of distribution that affects echa task

I need in a matrix report and abstract of each Dist and its cost distribuited en echa center.

Adding an example for better explanation.

 

ejm.png

 

Sorry about my english. Thanks

 

Franco Guevara

 

1 ACCEPTED SOLUTION
amitchandak
Super User
Super User

@FrancoGR , Unpivot the table B in power query and merge it with Table A, and then create a new column that is the multiplication of % from B and Costo from A

 

https://radacad.com/pivot-and-unpivot-with-power-bi
Append : https://radacad.com/append-vs-merge-in-power-bi-and-power-query

 

 

Otherwise join the two in Model view assuming B on 1 side

 

Create new measures

 

Center W m = Sumx(TableA, TableA[Costo] * related(TableB[Center W]) )

 

same way others , examples

Center X m = Sumx(TableA, TableA[Costo] * related(TableB[Center X]) )

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

5 REPLIES 5
parry2k
Super User
Super User

@amitchandak yes that will work but then needs to create four measures, and if I have to solve for this I will stay away from that but not a bad solution. 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
Super User
Super User

@amitchandak unpivot will not work because it will create many to many relationships and in that case, RELATED will not work.



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 , I mentioned that solution under "Otherwise join"

 

Sorry, If that was not clear @parry2k , @FrancoGR .

 

There are two solutions. one assuming 1-M join, Assuming B on one side

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
amitchandak
Super User
Super User

@FrancoGR , Unpivot the table B in power query and merge it with Table A, and then create a new column that is the multiplication of % from B and Costo from A

 

https://radacad.com/pivot-and-unpivot-with-power-bi
Append : https://radacad.com/append-vs-merge-in-power-bi-and-power-query

 

 

Otherwise join the two in Model view assuming B on 1 side

 

Create new measures

 

Center W m = Sumx(TableA, TableA[Costo] * related(TableB[Center W]) )

 

same way others , examples

Center X m = Sumx(TableA, TableA[Costo] * related(TableB[Center X]) )

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

@amitchandak 
thank You. Worked perfectly.

 

Franco GR

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.