Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
7 years ago
Solved

Display slicer values selected in card

Hello,

 

My report has two pages:  Intro and Data.  This report is exported to Power Point and sent to the customer, so for aesthetic purposes the slicers on the Data page are hidden (collapsible panel).  I would like to add cards to the Intro page which display the values selected in the Customer and Date Range slicers from the Data page.  Can anyone help me with the DAX to create this?

 

Thank you,

 

Stacey

  • You should be able to create a measure along the lines of

     

    IF (
      HASONEVALUE (**slicer field**),
      SELECTEDVALUE (**slicer field**),
      ""
    )

     

    Put that measure in the card and it should be empty when no slicer is selected, and populated when one is.

     

    Hope this helps

    David

  • For that you should be able to write a measure like

    MIN(**Date Field**) && “-“ && MAX(**Date Field**)

    That will give you a string to put in a card.

    Hope that helps
    David

16 Replies

  • dedelman_clng's avatar
    dedelman_clng
    Icon for Community Champion rankCommunity Champion

    You should be able to create a measure along the lines of

     

    IF (
      HASONEVALUE (**slicer field**),
      SELECTEDVALUE (**slicer field**),
      ""
    )

     

    Put that measure in the card and it should be empty when no slicer is selected, and populated when one is.

     

    Hope this helps

    David

    • lafondm's avatar
      lafondm
      Frequent Visitor

      This is a great building block, thanks for the paradigm!

    • Anonymous's avatar
      Anonymous
      Not applicable

       

      Hey ,
      Super user .

      Thanks for sharing this details of the Silcer to display.

    • rjs2's avatar
      rjs2
      Icon for Resolver I rankResolver I

      How do you display multiple values if multiples are selected?   I am using this for program names and sometimes we want to group programs into one report.

      • dedelman_clng's avatar
        dedelman_clng
        Icon for Community Champion rankCommunity Champion

        rjs2 - you should be able to use CONCATENATEX for this use case. Something along the lines of

         

        CONCATENATEX(ALLSELECTED(**slicer field**), **slicer field**, **delimeter**)

         

        Hope this helps

        David

  • Hey,

     

    maybe this great "Quick Measure" by Greg_Deckler may be some kind of overload for what you are looking, but there are some gems in it.

     

    Regards,

    Tom

    • Anonymous's avatar
      Anonymous
      Not applicable

      Thank you so much, dedelman_clng!  That is working perfectly for the card to display the customer selected.  Unfortunately it is not working to display what date range (from/to dates) in the date slicer.  I suspect it is due the HASONEVALUE and this slicer creates two values.  Any idea what tweak would be needed for that?

       

      Thanks again!

       

      Stacey

      • dedelman_clng's avatar
        dedelman_clng
        Icon for Community Champion rankCommunity Champion
        For that you should be able to write a measure like

        MIN(**Date Field**) && “-“ && MAX(**Date Field**)

        That will give you a string to put in a card.

        Hope that helps
        David
  • SarasGupta's avatar
    SarasGupta
    Regular Visitor

    Hi All,

    Display slicer values selected in card
    But i want it like this.. PLS HELP !!!

    If i Select "Jan" in Slicer then result on card would be "Jan"
    but if i select "Jan+Feb" then result would be "YTD Feb"
    if i select "Jan+Feb+Mar" then result would be "Q1"