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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
Anonymous
Not applicable

Disregard first slicer after selecting the second slicer

Hi Guys, Im still getting used to DAX and im stuck. I need some help with my visual.

 

These are the columns i summed for my Visual.
SUM.png

 

These are the filters. And for each filter i select, i want the corresponding "Sum" formula to calculate for me.

Filters.png

 

This is what happens. After choosing my second slicer, the values tend to get wrong. Its supposed to have 85% saturation however with my calculation im getting a way smaller number.

Visual.png

 

This is the calculation i have...I've also tries using the "ALL" and "ALLEXCEPT" function but still didnt get it to work.

formula.png

 

Hope there is a way to do this and i look forward to your help.

 

Thank you all,

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

hi, @Anonymous 

Do you mean that you want to disregard first slicer after selecting the second slicer and disregard first and second slicer after selecting the third slicer?

If so, you must define which slicer is first, second, third in the formula in advance.

Try this formula

Measure = 
SWITCH (
    TRUE (),
        ISFILTERED ( 'Lista De actividades'[Rol] ), CALCULATE (
        SUM ( 'Lista De actividades'[Saturaction Actual Sub Dept] ),
        ALL ( 'Lista De actividades'[Deparmento], 'Lista De actividades'[Sub-Deparmento] )
    ),
    ISFILTERED ( 'Lista De actividades'[Sub-Deparmento] ), CALCULATE ( SUM ( 'Lista De actividades'[Saturaction Actual Sub Dept] ), ALL ( 'Lista De actividades'[Deparmento] ) ),
    ISFILTERED ( 'Lista De actividades'[Deparmento] ), CALCULATE ( SUM ( 'Lista De actividades'[Saturaction Actual Sub Dept] ) ),
   
    
    BLANK ()
)

Best Regards,
Lin

 

 

Community Support Team _ Lin
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

2 REPLIES 2
v-lili6-msft
Community Support
Community Support

hi, @Anonymous 

Do you mean that you want to disregard first slicer after selecting the second slicer and disregard first and second slicer after selecting the third slicer?

If so, you must define which slicer is first, second, third in the formula in advance.

Try this formula

Measure = 
SWITCH (
    TRUE (),
        ISFILTERED ( 'Lista De actividades'[Rol] ), CALCULATE (
        SUM ( 'Lista De actividades'[Saturaction Actual Sub Dept] ),
        ALL ( 'Lista De actividades'[Deparmento], 'Lista De actividades'[Sub-Deparmento] )
    ),
    ISFILTERED ( 'Lista De actividades'[Sub-Deparmento] ), CALCULATE ( SUM ( 'Lista De actividades'[Saturaction Actual Sub Dept] ), ALL ( 'Lista De actividades'[Deparmento] ) ),
    ISFILTERED ( 'Lista De actividades'[Deparmento] ), CALCULATE ( SUM ( 'Lista De actividades'[Saturaction Actual Sub Dept] ) ),
   
    
    BLANK ()
)

Best Regards,
Lin

 

 

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

Thank you so much Lin! it worked! 🙂

 

 


@v-lili6-msft wrote:

hi, @Anonymous 

Do you mean that you want to disregard first slicer after selecting the second slicer and disregard first and second slicer after selecting the third slicer?

If so, you must define which slicer is first, second, third in the formula in advance.

Try this formula

Measure = 
SWITCH (
    TRUE (),
        ISFILTERED ( 'Lista De actividades'[Rol] ), CALCULATE (
        SUM ( 'Lista De actividades'[Saturaction Actual Sub Dept] ),
        ALL ( 'Lista De actividades'[Deparmento], 'Lista De actividades'[Sub-Deparmento] )
    ),
    ISFILTERED ( 'Lista De actividades'[Sub-Deparmento] ), CALCULATE ( SUM ( 'Lista De actividades'[Saturaction Actual Sub Dept] ), ALL ( 'Lista De actividades'[Deparmento] ) ),
    ISFILTERED ( 'Lista De actividades'[Deparmento] ), CALCULATE ( SUM ( 'Lista De actividades'[Saturaction Actual Sub Dept] ) ),
   
    
    BLANK ()
)

Best Regards,
Lin

 

 


 

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

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