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

Enhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.

Reply
Anonymous
Not applicable

how to select multiple values from the result of slicer

Hi guys,

    I created a merseaur to switch the results of the each columns, for example, if I select "M', then the result of the measure is select the result of column related with 'exclusive_sourcing_firm_m'.

    It is easy when make a single choice, but how should the code be write when multiple choices selected? For example, the choice is "M+1" and "M+2", how should I write to capture these values and return the sum of "

exclusive_sourcing_firm_m1" + "exclusive_sourcing_firm_m2" ?
3 REPLIES 3
v-kkf-msft
Community Support
Community Support

Hi @Anonymous ,

 

Has your problem been solved? If it is solved, please mark a reply which is helpful to you.

 

If the problem is still not resolved, please try the following formula:

 

Measure = 
IF (
    CALCULATE (
        DISTINCTCOUNT ( FactTable[Type] ),
        FILTER (
            ALLSELECTED ( FactTable ),
            FactTable[Product] = MAX ( FactTable[Product] )
        )
    )
        = DISTINCTCOUNT ( Slicer[Name] ),
    1
)

vkkfmsft_0-1646898478147.png

 

Best Regards,
Winniz

 

Samarth_18
Community Champion
Community Champion

Hi @Anonymous ,

 

Please refer below article. It helped me, hope it helps you too.

 

https://www.sqlbi.com/articles/apply-and-logic-to-multiple-selection-in-dax-slicer/ 

 

Thanks,

Samarth

Best Regards,
Samarth

If this post helps, please consider accepting it as the solution to help the other members find it more quickly.
Appreciate your Kudos!!
Connect on Linkedin

Anonymous
Not applicable

Thanks, good case.

Helpful resources

Announcements
July 2025 community update carousel

Fabric Community Update - July 2025

Find out what's new and trending in the Fabric community.

July PBI25 Carousel

Power BI Monthly Update - July 2025

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