Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.
I have a set of sales data by customer. However, some customers have the same parent company. I would like to show in a matrix vizualization the total sales by customer, and include the total sales by parent. Below is what the desired output would look like:
Customer | Parent | Customer Total | Parent Total | |||
Customer1 | Parent1 | $150 | $175 | |||
Customer2 | Parent1 | $25 | $175 | |||
Customer3 | Parent2 | $100 | $200 | |||
Customer4 | Parent2 | $50 | $200 | |||
Customer5 | Parent2 | $50 | $200 |
I've looked at various SUMIF-style solutions but none seem to give me the desired results. Is this possible, and if so what would the DAX be to calculate this?
Much appreciated.
Solved! Go to Solution.
@StevenHiatt , based on what I got, a measure for
Parent Total =
calculate([Customer Total], filter( allselected(Table), Table[Customer] = max(Table[Customer])))
Thanks so much. Slight change to get the right answer:
calculate([Customer Total], filter( allselected(Table), Table[Parent] = max(Table[Parent])))
but that got me pointed in the right direction.
Just curious what the MAX is doing in the formula? Would MIN or AVG, etc work essentially the same?
@StevenHiatt , based on what I got, a measure for
Parent Total =
calculate([Customer Total], filter( allselected(Table), Table[Customer] = max(Table[Customer])))
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
104 | |
101 | |
79 | |
72 | |
64 |
User | Count |
---|---|
143 | |
109 | |
103 | |
82 | |
74 |