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.
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
Solved! Go to Solution.
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:
Here is the output:
1.
2.
3.
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.
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:
Here is the output:
1.
2.
3.
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.
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.
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
109 | |
99 | |
77 | |
66 | |
54 |
User | Count |
---|---|
144 | |
104 | |
101 | |
86 | |
64 |