Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes! Register now.

Reply
Anonymous
Not applicable

How to select multiple measures from a list and sum the selected ones into another measure

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!!!!!!!!!!

1 ACCEPTED SOLUTION
v-lid-msft
Community Support
Community Support

Hi @Anonymous ,

 

We can use the following steps to meet your requirement.

  1. We can create a new table that contains measures’ name.
 

 

  1. Then we can create a measure like this,
Measure = 
SUMX(
    VALUES('Table (2)'[Row]),
    SWITCH(
        'Table (2)'[Row],
        "M1",[M1],
        "M2",[M2],
        "M3",[M3],
        "M4",[M4])
)

 

  1. At last we create a slicer using the new table’s column, and put the measure in a card

We can get the result like this,

 

 

 

34.png35.png36.png

 

 

 

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,

 

Community Support Team _ Dong Li
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

4 REPLIES 4
Anonymous
Not applicable

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!

v-lid-msft
Community Support
Community Support

Hi @Anonymous ,

 

We can use the following steps to meet your requirement.

  1. We can create a new table that contains measures’ name.
 

 

  1. Then we can create a measure like this,
Measure = 
SUMX(
    VALUES('Table (2)'[Row]),
    SWITCH(
        'Table (2)'[Row],
        "M1",[M1],
        "M2",[M2],
        "M3",[M3],
        "M4",[M4])
)

 

  1. At last we create a slicer using the new table’s column, and put the measure in a card

We can get the result like this,

 

 

 

34.png35.png36.png

 

 

 

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,

 

Community Support Team _ Dong Li
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

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!!

Anonymous
Not applicable

Thank you very much! That was exactly what I needed! 🙂

Helpful resources

Announcements
September Power BI Update Carousel

Power BI Monthly Update - September 2025

Check out the September 2025 Power BI update to learn about new features.

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.

Top Solution Authors