The ultimate Fabric, Power BI, SQL, and AI community-led learning event. Save €200 with code FABCOMM.
Get registeredEnhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends September 15. Request your voucher.
Hi
I want to group the below data so it shows sub groupings for gross profit and gross operating profit using DAX:
I would like to show Revenue and Cost of sale under "Gross Profit" and Delivery and Operations under Gross Operating Profit so it looks something like the below:
Please can someone shed some light on how I can acheive this?
Thanks
Matt
Solved! Go to Solution.
@Mattm1989 You generally use a disconnected table for this, similar to this: The New Hotness (Custom Matrix Hierarchy) - Microsoft Fabric Community
Your solution is so great Greg_Deckler
Hi, @Mattm1989
According to your description and the screenshots shown, in addition to using the Super User method to achieve this goal, you can also refer to the following method:
Since the matrix implements a hierarchical structure, you have the following levels:
If not, you can increase these calculated columns using the IF condition or the switch function. Set in the matrix as follows:
If you want to change the calculation method for a certain level, you can do the following:
Measure =
IF(NOT HASONEFILTER('Table'[Category1]) && SELECTEDVALUE('Table'[Category2]) = "Gross Profits",10000,SUM('Table'[Amount]))
If you want to modify calculations at multiple levels at the same time:
The above and the documentation provided by Super User are the current viable methods. In Power BI, you can't add rows to a matrix at will. This is the same principle as pivot tables in Excel.
Best Regards
Jianpeng Li
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Your solution is so great Greg_Deckler
Hi, @Mattm1989
According to your description and the screenshots shown, in addition to using the Super User method to achieve this goal, you can also refer to the following method:
Since the matrix implements a hierarchical structure, you have the following levels:
If not, you can increase these calculated columns using the IF condition or the switch function. Set in the matrix as follows:
If you want to change the calculation method for a certain level, you can do the following:
Measure =
IF(NOT HASONEFILTER('Table'[Category1]) && SELECTEDVALUE('Table'[Category2]) = "Gross Profits",10000,SUM('Table'[Amount]))
If you want to modify calculations at multiple levels at the same time:
The above and the documentation provided by Super User are the current viable methods. In Power BI, you can't add rows to a matrix at will. This is the same principle as pivot tables in Excel.
Best Regards
Jianpeng Li
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Surely there must be another way? This seems fairly complex for a beginner to try and figure out! 😕
@Mattm1989 You generally use a disconnected table for this, similar to this: The New Hotness (Custom Matrix Hierarchy) - Microsoft Fabric Community
User | Count |
---|---|
69 | |
68 | |
65 | |
54 | |
28 |
User | Count |
---|---|
112 | |
82 | |
65 | |
48 | |
43 |