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.
Dear All,
let's say I have created 4 measures called M1,M2,M3,M4.
Each measure is the SUMX of a different column on the same table.
What I need is to have the possibility to choose from a slicer which measures (from M1 to M4) include or exclude from the calculation into another measure (e.g. "TOTAL") that contains the dynamic SUM of the selected ones.
e.g.
If I select M1, M2 and M4, from the slicer, TOTAL would be the sum of M1+M2+M4.
Any help or any idea please!!!!!!!!!!
Solved! Go to Solution.
Hi @Anonymous ,
We can use the following steps to meet your requirement.
Measure =
SUMX(
VALUES('Table (2)'[Row]),
SWITCH(
'Table (2)'[Row],
"M1",[M1],
"M2",[M2],
"M3",[M3],
"M4",[M4])
)
We can get the result like this,
If it doesn’t meet your requirement, could you please show the exact expected result based on the table that we have shared?
BTW, pbix as attached.
Best regards,
Hi there,
I'm trying to do something similar, except for the options I have in the slicer are months. And there continue to be new months added as time passes. In the suggested switch function, is there a way to make the slicer options dynamic, as opposed to manually entering in each slicer option?
Thank you very much for your help!
Hi @Anonymous ,
We can use the following steps to meet your requirement.
Measure =
SUMX(
VALUES('Table (2)'[Row]),
SWITCH(
'Table (2)'[Row],
"M1",[M1],
"M2",[M2],
"M3",[M3],
"M4",[M4])
)
We can get the result like this,
If it doesn’t meet your requirement, could you please show the exact expected result based on the table that we have shared?
BTW, pbix as attached.
Best regards,
Hello everyone!
I have a problem that I hope can be solved.
I have 4 products (P), and with each of them I have created 2 measures.
1- Euros (€)
2- Units. (you)
If I have 8 measures P1 €,P2€,P3€,P4€ and P1ud,P2ud,P3ud,P4ud.
I would create a segmentation with two options one for € and one for you.
So when I filter by € bring me to a table or matrix the values of the 4 products in 4 columns.
Thanks a lot!!
Thank you very much! That was exactly what I needed! 🙂
Check out the July 2025 Power BI update to learn about new features.
This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.
User | Count |
---|---|
72 | |
71 | |
38 | |
31 | |
27 |
User | Count |
---|---|
91 | |
50 | |
44 | |
40 | |
35 |