Forum Discussion

22LACMT's avatar
22LACMT
Icon for Helper III rankHelper III
3 years ago
Solved

Dax all funtion

How do i need to change the below dax? 

 

* goal : I am trying to calculate a percentage and use the All function to keep the denominator from being affected by the filtering of the visual. 

 

tier1exposure%fixedgrandtotal = (DIVIDE('percent'[Tier1Exposure],SUMX('percent',ALL('percent'[Tier1Exposure]))))
  • Anonymous's avatar
    Anonymous
    3 years ago

    Hi 22LACMT ,

     

    As far as I know, ALL() function should add in the table part of your code. Try the measure as below.

    tier1exposure%fixedgrandtotal =
    (
        DIVIDE (
            'percent'[Tier1Exposure],
            SUMX ( ALL ( 'percent' ), 'percent'[Tier1Exposure] )
        )
    )
    

     

    Best Regards,
    Rico Zhou

     

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

1 Reply

  • Anonymous's avatar
    Anonymous
    Not applicable

    Hi 22LACMT ,

     

    As far as I know, ALL() function should add in the table part of your code. Try the measure as below.

    tier1exposure%fixedgrandtotal =
    (
        DIVIDE (
            'percent'[Tier1Exposure],
            SUMX ( ALL ( 'percent' ), 'percent'[Tier1Exposure] )
        )
    )
    

     

    Best Regards,
    Rico Zhou

     

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