Forum Discussion

planc7's avatar
planc7
Helper I
1 year ago
Solved

ALL function clarification

Hy everyone,

I have this very simple table:

Spoiler
YEARBRANDVALUEDATA TYPE
2019AA172ACT+FRC
2019AA188BDG
2020AA131,5ACT+FRC
2020AA189BDG
2021AA167BDG
2021AA197,5ACT+FRC
2022AA204BDG
2022BB2ACT+FRC
2022AA206,5ACT+FRC
2023AA226ACT+FRC
2023AA244BDG
2023BB2BDG
2024BB2BDG
2024AA184ACT+FRC
2024AA226,5BDG
2025CC347BDG
2025CC223,5BDG
2025BB2BDG
2025AA199,5ACT+FRC
2025AA224BDG
2025AA230BDG
2026AA209,5BDG
2026CC325BDG

 

 

What i need to do, is showing all the "BDG" values even if "ACT+FRC" value is filtered.

The formula that I'm using is really simple and it is the following:

CALCULATE( SUM('Table'[VALUE]), 'Table'[DATA TYPE] = "BDG", ALL('Table'[DATA TYPE]) )

 

 


But, even if I used the ALL function to ignore the filter on DATA TYPE the matrix shows only this value
(for example, nor values for CC neither for BB is shown). 
 
How does ALL function work if a filter context exist?
Thank you, it is driving me crazy.
  • Hi planc7 ,

    This occurs because brands AA and BB have some rows with the Data Type equal to "ACT+FRC," which is why they appear in the results. On the other hand, brand CC has no rows with the Data Type "ACT+FRC," so it was excluded.

    The ALL function is working correctly; when using ALL in DAX, it removes any filters applied to a specific column or table.

    My question is, why are you filtering only "ACT+FRC" if you want to see both Data Types?

    To learn more about the ALL function, click here 

2 Replies

  • Hi planc7 ,

    This occurs because brands AA and BB have some rows with the Data Type equal to "ACT+FRC," which is why they appear in the results. On the other hand, brand CC has no rows with the Data Type "ACT+FRC," so it was excluded.

    The ALL function is working correctly; when using ALL in DAX, it removes any filters applied to a specific column or table.

    My question is, why are you filtering only "ACT+FRC" if you want to see both Data Types?

    To learn more about the ALL function, click here 

  • Anonymous's avatar
    Anonymous
    Not applicable

    Hi planc7 ,

     

    I recommend using this DAX formula and then disconnecting the slicer from the matrix visual directly.

    CALCULATE(SUM('Table'[VALUE]),'Table'[DATA TYPE] = "BDG")
    

     

    Best Regards,

    Bof