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

Earn the coveted Fabric Analytics Engineer certification. 100% off your exam for a limited time only!

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
April AMA free

Microsoft Fabric AMA Livestream

Join us Tuesday, April 09, 9:00 – 10:00 AM PST for a live, expert-led Q&A session on all things Microsoft Fabric!

March Fabric Community Update

Fabric Community Update - March 2024

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