Forum Discussion

aashritsingh's avatar
aashritsingh
Icon for Helper I rankHelper I
2 years ago
Solved

Calculate with ALLEXCEPT not working

We have a basic requirement of calculating percentage of total.

 

In the below screenshot, the Test (All) metric needs to ignore the risk province filter and provid ethe sum total for each month. But, it is still considering the risk province column as a filter even though it is not included in the ALLEXCEPT clause.

 

Please assist.

 

Thank you.

  • pls try this

     

    Test (All) = 
       CALCULATE([Test_Measure], REMOVEFILTERS(),VALUES(ACC0UNTING_M0NTH[Year Month]))

     

5 Replies

  • pls try this

     

    Test (All) = 
       CALCULATE([Test_Measure], REMOVEFILTERS(),VALUES(ACC0UNTING_M0NTH[Year Month]))

     

    • aashritsingh's avatar
      aashritsingh
      Icon for Helper I rankHelper I

      Hi 

       

      They are from two different Dimension tables that are connected through a Fact table from which Measure values are calculated.

  • Anonymous's avatar
    Anonymous
    Not applicable

    Hi  aashritsingh ,

     

    You can try the following measure:

    Test (ALL) =
    SUMX(
        FILTER(ALL('ACCOUNTING_MONTH'),
        'ACCOUNTING_MONTH'[Year_Month]=MAX('ACCOUNTING_MONTH'[Year_Month])),[Test_Measure])

    Refer to:

    ALL function (DAX) - DAX | Microsoft Learn

    If it doesn't meet your desired outcome, can you share sample data and sample output in table format? Or a sample pbix after removing sensitive data. We can better understand the problem and help you.

     

    Best Regards,

    Liu Yang

    If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

  • Thanks everyone. The solution has worked. Appreciate theh support.