Power BI is turning 10, and we’re marking the occasion with a special community challenge. Use your creativity to tell a story, uncover trends, or highlight something unexpected.
Get startedJoin us for an expert-led overview of the tools and concepts you'll need to become a Certified Power BI Data Analyst and pass exam PL-300. Register now.
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 😍
This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.
Check out the June 2025 Power BI update to learn about new features.
User | Count |
---|---|
10 | |
9 | |
8 | |
6 | |
5 |
User | Count |
---|---|
20 | |
14 | |
10 | |
9 | |
6 |