Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
2 years ago
Solved

Can't create a static measure.

I have a Dashboard where I display population. I can select small population areas from a slicer, map visual or stacked bar chart and other visuals update to reflect these selections.   I am trying...
  • Anonymous's avatar
    Anonymous
    2 years ago

    Hi Anonymous ,

    I create a table as you mentioned.

    Then I create a measure and here is the DAX code.

    Percent =
    CALCULATE ( SUM ( 'Table'[Population] ) )
        / CALCULATE ( SUM ( 'Table'[Population] ), ALLSELECTED ( 'Table' ) )
    

    I add a slicer and I can use it in any visual.

     

     

     

    Best Regards

    Yilong Zhou

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