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
DemoFour
Responsive Resident
Responsive Resident

Show only Filtered Values on a card within a drill through page

Hi peeps, happy Friday! 

I have a report with drill through page and the customer wants to display the name of the entity on the top of the page when they drill through to the detail. this can be filtered from a slicer on that page. I have used following code: 

 

Directorate Visual Card = 
IF( 
    HASONEVALUE('HLD'[Directorate] ),
    SELECTEDVALUE( 'HLD'[Directorate] ),
    CONCATENATEX( 
       VALUES( Directorate[Directorate Short Name] ),
      Directorate[Directorate Short Name] , ", " 
    )
)

 

However when there is one slicer value selected it gives me the name in the card as it would, but when there are multiple selections or no selection it concatenates all names. 

Output = when >1 name is selected I want to show just these names concatenated and not every name, as this is misleading. 

 

Any help in how to achieve this most welcome, I have tried FILTER and NOT ISFILTERED to try and get just the selection, but this is not working, as I don't want to add text to say "Multiple" etc. 

I am hoping this is just that Friday exhaustion kicking in and its actually quite obvious 🙂 

Thanks 

1 ACCEPTED SOLUTION
v-eqin-msft
Community Support
Community Support

Hi  @DemoFour ,

 

Sorry for that the information you have provided is not making the problem clear to me. I have built a simply data sample for test:

Eyelyn9_0-1658221269890.png    Eyelyn9_1-1658221278149.png

Here is the output:

1.

Eyelyn9_2-1658221313223.png

2.

Eyelyn9_3-1658221320370.png

3.

Eyelyn9_4-1658221328197.png


Please provide me with more details about your table and your problem or share me with your pbix file after removing sensitive data.

 

Refer to:

How to Get Your Question Answered Quickly - Microsoft Power BI Community

How to provide sample data in the Power BI Forum - Microsoft Power BI Community

 

Best Regards,
Eyelyn Qin
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

3 REPLIES 3
v-eqin-msft
Community Support
Community Support

Hi  @DemoFour ,

 

Sorry for that the information you have provided is not making the problem clear to me. I have built a simply data sample for test:

Eyelyn9_0-1658221269890.png    Eyelyn9_1-1658221278149.png

Here is the output:

1.

Eyelyn9_2-1658221313223.png

2.

Eyelyn9_3-1658221320370.png

3.

Eyelyn9_4-1658221328197.png


Please provide me with more details about your table and your problem or share me with your pbix file after removing sensitive data.

 

Refer to:

How to Get Your Question Answered Quickly - Microsoft Power BI Community

How to provide sample data in the Power BI Forum - Microsoft Power BI Community

 

Best Regards,
Eyelyn Qin
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

UrszulaPukalska
Frequent Visitor

Hi,

 

I have prepared card with measure to get names of selected values in slicer and it looks like below.

My scenario is to select agents and then drillthrouh to the next page. On the next page I want to see selected agents and if there are more than 3 then display "multiple selections"

 

_Selected Agent = 
VAR _Count = countrows(Values(Agent[AgentName]))
VAR _Concat = CONCATENATEX(Values(Agent[AgentName]),[AgentName],",")
VAR _Selection = IF(ISFILTERED(Agent[AgentName]),1,0)
return if(
_Selection=0,"All",IF(AND(_Count>3,_Selection=1),"Multiple selection",_Concat
))

 

Thanks @UrszulaPukalska for your reply, 

I have looked into your code and the result is the same = All names coming through or the answer as coded in your IF statement. 

What I want to achieve is, if N slicer values are chosen, just these values to appear in the card. 

IF 2 names are chosen in the main page with the slicer. then the drill through page displays the two names. Currently I get all 5 names appearing. 

I will keep trying, thank you for taking the time to post up.  

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.