Join us for an expert-led overview of the tools and concepts you'll need to pass exam PL-300. The first session starts on June 11th. See you there!
Get registeredPower BI is turning 10! Let’s celebrate together with dataviz contests, interactive sessions, and giveaways. Register now.
Hi Experts,
I have a matrix to show the inventory by three diferent Categories:
That amounts are calculated and Vary by month.
The user can select from the Slicer 1,2 or all categories and the Matrix show a total by Categories selected without issues.
The results is similar to this if all categories are selected.
Restaurant | Beverages | Food | Uniforms | Total |
Rst-01 | 250 | 300 | 1200 | 1750 |
Rst-02 | 500 | 350 | 860 | 1710 |
Rst-03 | 600 | 450 | 750 | 1800 |
Rst-04 | 800 | 600 | 700 | 2100 |
Rst-05 | 1200 | 167 | 800 | 2167 |
Now, the user wants show in the matrix two additional columns(Initial Setup and Other setup) with Fixed values by Restaurant, but he wants to add the fixed amounts in the 'total'
NOTE: that amounts for Initial Setup and Other setup are fixed By restaurant (no calculations)
By Eaxmple:
If the user ONLY select Beverages and Food, the TOTAL must sum Beverages and food PLUS Initial setup and Other setup.
I added the new columns in the row fields and it are showed in the Matrix.
Restaurant | Initial setup | Other Setup | Beverages | Food | Total |
Rst-01 | 100 | 50 | 250 | 300 | 700 |
Rst-02 | 120 | 150 | 500 | 350 | 1120 |
Rst-03 | 300 | 120 | 600 | 450 | 1470 |
Rst-04 | 256 | 80 | 800 | 600 | 1736 |
Rst-05 | 213 | 50 | 1200 | 167 | 1630 |
How can I do that, if in the categories I only have the three categories that I already mentioned
In other words i need that the last colum (Total) summarize the amounts in categories selected Plus the two fixed values(Initial Setup and Other setup). Is it Possible?
I really appreciate your help..
Solved! Go to Solution.
Hi @gomezc73 ,
You can follow these steps to solve your problem:
1.Unpivot all categories column.
2.Add a column.
Column =
'Table'[Initial setup] + 'Table'[Other Setup]
3.Add a measure.
total =
CALCULATE (
SUM ( 'Table'[Value] ),
FILTER ( 'Table', 'Table'[Restaurant] = SELECTEDVALUE ( 'Table'[Restaurant] ) )
)
+ SELECTEDVALUE ( 'Table'[Column] )
Output:
How to Get Your Question Answered Quickly - Microsoft Fabric Community
If it does not help, please provide more details with your desired out put and pbix file without privacy information.
Best Regards,
Yifan Wang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi @gomezc73 ,
You can follow these steps to solve your problem:
1.Unpivot all categories column.
2.Add a column.
Column =
'Table'[Initial setup] + 'Table'[Other Setup]
3.Add a measure.
total =
CALCULATE (
SUM ( 'Table'[Value] ),
FILTER ( 'Table', 'Table'[Restaurant] = SELECTEDVALUE ( 'Table'[Restaurant] ) )
)
+ SELECTEDVALUE ( 'Table'[Column] )
Output:
How to Get Your Question Answered Quickly - Microsoft Fabric Community
If it does not help, please provide more details with your desired out put and pbix file without privacy information.
Best Regards,
Yifan Wang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
User | Count |
---|---|
84 | |
75 | |
69 | |
48 | |
39 |
User | Count |
---|---|
111 | |
56 | |
50 | |
42 | |
40 |