Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
3 years ago
Solved

Modify Dax measure to include multiple selected cities

Hi Experts

 

How can i change the following DAX measure so if i select mulitple cities on my slicers they are reflected in the title in the graph...

Dynamic Title (Congestion) =
VAR Result = "Congestion Delay Index:"&" "&SELECTEDVALUE(DimCongestionCity[City])
Return
 Result
 
the above measure does not work if i select more than one city from the sclier...ie the city name section is blank
  • Anonymous's avatar
    Anonymous
    3 years ago

    worked it out 

    Dynamic Title (Congestion) =
    VAR Result = "Congestion Delay Index:"&" "&CONCATENATEX(DimCongestionCity,DimCongestionCity[City]," ,")
    Return
     Result

4 Replies

  • Hi Anonymous , 
    Please try to use ALLSELECTED function .
    For example :- 

    AllSelected = CALCULATE(SUM(Orders[Sales]) ,ALLSELECTED(Orders[Product Category]))

    Please refer to the link :-

    https://learn.microsoft.com/en-us/dax/allselected-function-dax

    Thanks ,
    Pratyasha Samal 
    Has this post solved your problem? Please Accept as Solution so that others can find it quickly and to let the community know your problem has been solved.
    If you found this post helpful, please give Kudos C

     

    • Anonymous's avatar
      Anonymous
      Not applicable

      HI pratyashasamal  this a title measure - not sure how i intergrate allselected into my measure???? based on slicer selection

      • Anonymous's avatar
        Anonymous
        Not applicable

        worked it out 

        Dynamic Title (Congestion) =
        VAR Result = "Congestion Delay Index:"&" "&CONCATENATEX(DimCongestionCity,DimCongestionCity[City]," ,")
        Return
         Result