Forum Discussion
Display dimension in tooltip based on slicer selection
Hi fibaek ,
Not really sure of what is the final result you want to have in your tooltip, but in my case what I did was simple card with the following syntax for the tooltip:
Filtering =
SWITCH (
TRUE ();
ISFILTERED ( 'Table'[BU] );
CONCATENATEX (
ALLSELECTED ( 'Table' );
'Table'[SBU] & " - "
& CALCULATE (
SUM ( 'Table'[Value] );
FILTER ( ALL ( 'Table'[SBU] ); 'Table'[SBU] IN VALUES ( 'Table'[SBU] ) )
);
UNICHAR ( 10 )
);
ISFILTERED ( 'Table'[Region] );
CONCATENATEX (
'Table';
'Table'[BU] & " - "
& CALCULATE (
SUM ( 'Table'[Value] );
FILTER ( ALL ( 'Table'[BU] ); 'Table'[BU] IN VALUES ( 'Table'[BU] ) )
);
UNICHAR ( 10 )
)
)
The trick here is the ISFILTERED part. Can you please tell what type of tooltip you want to display?
Also be aware of rthe order of the syntax otherwise the result will be incorrect.
- fibaek5 years agoHelper I
Hello MFelix ,
Thank you once again! Your solution is close to being exactly what I am trying to do. The users will typically select a region – either directly through the slicer or be restricted through RLS – and then potentially one or more BUs. In case of no selection the user should see the regions – not the SBUs - in the table, and if both region and BU is selected it should act as if only BU is selected. But other than that it is absolutely perfect! I have tried playing around with some logical NOTs but haven’t quite been able to nail it because BU is included in the tooltip. Any input would be highly appreciated!
It seems like the measure for formatting is not needed? I just added another measure and did conditional formatting on it. Looks just fine.
Link to .pbix on ondrive: https://1drv.ms/u/s!AmZ2f-AI5Q3zgYsQLvmSZyPrF_t1gg?e=9AYQEl
Thanks,
/Sune
- MFelix5 years agoSuper User
Hi fibaek ,
I have one question regarding the information you have place in the PBIX file.
You refer everything is working properly however I'm always seeing the same filtering in your visualization that don't match your request.
What do you need me to help you with, I have to be honest I got lost about what you need.