Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
Anonymous
Not applicable

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

2 ACCEPTED SOLUTIONS
dedelman_clng
Community Champion
Community 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

View solution in original post

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

View solution in original post

16 REPLIES 16
SarasGupta
Regular Visitor

Hi All,

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

SarasGupta_0-1692192871577.png

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"

TomMartens
Super User
Super User

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



Did I answer your question? Mark my post as a solution, this will help others!

Proud to be a Super User!
I accept Kudos 😉
Hamburg, Germany
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

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
dedelman_clng
Community Champion
Community 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

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.

@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

Hai dedelman_clng

 Here, I am Used this function and it is working but here the issue is before selecting the values it shows all the values in the card.

I need only the selected Values in the card. otherwise the card should be empty or placeholder like (Customer Name)

this gives me all values in the slicer, not just the ones selected

@rjs2 - please create a new thread. You will likely need to share a copy of your pbix, your model, data, etc in order to debug your specific use case.

 

See this post How-to-Get-Your-Question-Answered-Quickly for examples of how you should request for assistance.

 

Thanks,

David

how would I combine that with this? 

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

ALLSELECTED seems to be pulling all values in slicer regardless if its selected, if I replace the false value with this CONCATENATEX(ALLSELECTED(**slicer field**), **slicer field**, **delimeter**)  -  I want it to combine all values that are selected in the slicer not all values in the slicer

Hai rjs2

 Here, I am Used this function and it is working but here the issue is before selecting the values it shows all the values in the card.

I need only the selected Values in the card. otherwise the card should be empty or placeholder like (Customer Name). 

Hi @rjs2  - yo uwould not combine it with the previous formula. It would exist by itself.

 

If you have further issues I would suggest opening a new thread as this one has already been marked solved so most people don't keep up with them.

 

Hope this helps

David

Anonymous
Not applicable

 

Hey ,
Super user .

Thanks for sharing this details of the Silcer to display.

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

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.