Forum Discussion

Alfista1997's avatar
Alfista1997
Frequent Visitor
3 years ago

Dynamic Measure Based on Multiple Slicers

I'm looking for a way to incorporate a measure to do the following. I've got two slicers on my page one for Dealer Group and another for Dealer Number. Above my data I have a title that I'd like to be dynamic based on their slicer selected.

 

For example, if the user selected "Dealer Group A" in the slicer, the title would be "Dealer Group A"; however, if the user selected "99999" in the dealer slicer, the title would now read as "99999". These two fields are connected in a way, however, they are two seperate columns in the data set. Delaer Number is a sub category of Dealer Group, there can be multiple Dealer Numbers in a Dealer Group. I've got two measures that will pull the selcted value, but now I just can't figure out a measure to say: when one is selected, pull X, if another is selected, pull Y. 

 

Dealer Group DAX Measure: 

Dealer Group Name =
VAR SelectedGroupName =
    SELECTEDVALUE(d_DFS_DEALERS[DEALER GROUP NAME & NUMBER],
        IF(ISFILTERED(d_DFS_DEALERS[DEALER GROUP NAME & NUMBER]),
            "Multiple Dealer Groups Selected", "All Dealer Groups Selected"
        )
    )
RETURN SelectedGroupName
 
Dealer Name DAX Measure: 
Primary Dealer Name =
VAR SelectedDealerName =
    SELECTEDVALUE(d_DFS_DEALERS[PRIMARY DEALER NAME & NUMBER],
        IF(ISFILTERED(d_DFS_DEALERS[PRIMARY DEALER NAME & NUMBER]),
            "Multiple Primary Dealers Selected", "All Primary Dealers Selected"
        )
    )
RETURN SelectedDealerName

2 Replies

  • VijayP's avatar
    VijayP
    Community Champion

    Alfista1997 

    is that value always 99999 or any other. if it is same always, youcan use that logic

    if(selectedvalue(column) = 999999,selectedvalue(column), selectedvalue(othercolumn) )

    • Alfista1997's avatar
      Alfista1997
      Frequent Visitor

      No not in this case, there's thounds of values in both the Dealer Group and Dealer Name columns.