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

Grow your Fabric skills and prepare for the DP-600 certification exam by completing the latest Microsoft Fabric challenge.

Reply
arnold61
Regular Visitor

Create a card that will show me all selected values in the slicers on the report

Hi Community,

I am trying to create a card that will show me all selected values in the slicers on the report. The reason why I need it is that the slicers themselves are hidden using a bookmark and when users want to print the report they would like to see which filters have been applied. Unhiding the slicers is not an option because it will cover some visuals.

I have no issue with creating the measure for simple slicers like date, country, etc. However, I have a hierarchy slicer like the below and that is what I am struggling with at the moment:

arnold61_0-1655825128441.png

 

 

 

In the example above my measure should return this:

A: DE,EN ; B:1

I have tried making use of CONCATENATEX function, but that does not work as I want it to work, unfortunately. Maybe some of you have any ideas?

 

3 REPLIES 3
arnold61
Regular Visitor

Thanks for the suggested solution, however, the issue is that we can have a lot of categories, not just A and B and we do not have a fixed number of those categories, moreover they can change over time and we need the DAX formula to pick that up automatically...do you have any ideas?

@arnold61 

so far i don't have any better solution for this. Let's see if anyone else can help you





Did I answer your question? Mark my post as a solution!

Proud to be a Super User!




ryan_mayu
Super User
Super User

@arnold61 

here is a workaround for you.

Measure = 
VAR _counta=COUNTROWS(FILTER('Table (2)','Table (2)'[group]="A"))
VAR _countb=COUNTROWS(FILTER('Table (2)','Table (2)'[group]="B"))
return IF(ISBLANK(_counta),"B:" & CONCATENATEX('Table (2)','Table (2)'[value],","),if(ISBLANK(_countb),"A:" & CONCATENATEX('Table (2)','Table (2)'[value],","),"A:"&  CONCATENATEX(FILTER('Table (2)','Table (2)'[group]="A"),'Table (2)'[value],",") & ";B:" &CONCATENATEX(FILTER('Table (2)','Table (2)'[group]="B"),'Table (2)'[value],",") ))

1.PNG

pls see the attachment below





Did I answer your question? Mark my post as a solution!

Proud to be a Super User!




Helpful resources

Announcements
RTI Forums Carousel3

New forum boards available in Real-Time Intelligence.

Ask questions in Eventhouse and KQL, Eventstream, and Reflex.

MayPowerBICarousel1

Power BI Monthly Update - May 2024

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