Power BI is turning 10! Tune in for a special live episode on July 24 with behind-the-scenes stories, product evolution highlights, and a sneak peek at what’s in store for the future.
Save the dateEnhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.
Hi!
I am currenlty building a power bi dashboard for a profitability report and I was wondering if it was possible to change a formula in an user freindly way. Let me explain you what I mean by a concrete example.
I have 4 different types of costs, called CM, CM1, CM2, CM3.
The total of these cost is the total cost of a product.
Each cost is calculated from a different formula, for example
- CM = Raw Materials + Mold + Energy
- CM1 = Payroll Employees+ Packaging
I would like to know if there could be an easy way for the final user to change the variable, for example :
=> User wants to put packaging in CM
and therefore have =
-CM = Raw materials+Mold+Energy+Packaging
-CM1 = Payroll Employees
But without having change the formulas in power bi.
Do you think it is possible ?
Thank you a lot and I wish you a good day
Solved! Go to Solution.
Hi,
You could use either multiple slicer tables or one and utilize EXCEPT.
Start data:
'MaterialCostTable'
'Slicer CM1'
Data model:
Dax:
End result:
Explanation:
So in my example I have to different ways of doing this. You can use multiple slicers (as seen on the picture) and select each cost you want to include in the calculation.
The second option is to use one slicer and in this alternate example [CM2 alternate] includes all of the selections not selected in CM1 slicer (As you can see CM2 and CM2 alternate return the same result using different method).
I hope this helps to solve your issue and if it does consider accepting this as a solution and giving the post a thumbs up!
Proud to be a Super User!
Hi,
You could use either multiple slicer tables or one and utilize EXCEPT.
Start data:
'MaterialCostTable'
'Slicer CM1'
Data model:
Dax:
End result:
Explanation:
So in my example I have to different ways of doing this. You can use multiple slicers (as seen on the picture) and select each cost you want to include in the calculation.
The second option is to use one slicer and in this alternate example [CM2 alternate] includes all of the selections not selected in CM1 slicer (As you can see CM2 and CM2 alternate return the same result using different method).
I hope this helps to solve your issue and if it does consider accepting this as a solution and giving the post a thumbs up!
Proud to be a Super User!
Thank you very much! Perfect solution! What a master 😍
Check out the July 2025 Power BI update to learn about new features.
User | Count |
---|---|
22 | |
7 | |
6 | |
6 | |
6 |
User | Count |
---|---|
27 | |
12 | |
10 | |
9 | |
6 |