Forum Discussion
Show/Hide a table based on slicer value
Hi
I would like to show 0 values in a table if a slicer value is not selected/a message to prompt the user to select a slicer value.
I got this working but I couldn't scroll down the table because the other card visual with the message to 'Select a value in the slicer' was in the way so this didn't work properly.
For now, it displays everything in a table which is not ideal. I also want two of the same column values e.g. 'Product categories' to display in both the table and the slicer visual.
Thanks in advance,
Laura
Thanks,
Laura
- Anonymous1 year ago
Hi Lauraeire_81,
Thank you for reaching out in Microsoft Community Forum.
Thank you parry2k for the helpful response.
Please follow below steps to acheive the error;
1.Create a measure to check if a slicer value is selected:
IsCategorySelected = IF(ISFILTERED('YourTable'[Product Category]), 1, 0)2.Create a card visual with a message like:
MessageText = IF([IsCategorySelected] = 0, "Please select a product category from the slicer.", BLANK())3.Please Make sure the message card doesn’t overlap the table, or use bookmarks and layering to toggle visuals cleanly.
4.Modify your table measures like:
Sales = IF([IsCategorySelected] = 0, 0, [Actual Sales])
Please continue using Microsoft community forum.
If you found this post helpful, please consider marking it as "Accept as Solution" and give it a 'Kudos'. if it was helpful. help other members find it more easily.
Regards,
Pavan.
3 Replies
- AnonymousNot applicable
Hi Lauraeire_81,
Thank you for reaching out in Microsoft Community Forum.
Thank you parry2k for the helpful response.
Please follow below steps to acheive the error;
1.Create a measure to check if a slicer value is selected:
IsCategorySelected = IF(ISFILTERED('YourTable'[Product Category]), 1, 0)2.Create a card visual with a message like:
MessageText = IF([IsCategorySelected] = 0, "Please select a product category from the slicer.", BLANK())3.Please Make sure the message card doesn’t overlap the table, or use bookmarks and layering to toggle visuals cleanly.
4.Modify your table measures like:
Sales = IF([IsCategorySelected] = 0, 0, [Actual Sales])
Please continue using Microsoft community forum.
If you found this post helpful, please consider marking it as "Accept as Solution" and give it a 'Kudos'. if it was helpful. help other members find it more easily.
Regards,
Pavan. - parry2k
Super User
Lauraeire_81 check out these two videso on my YT channel:
Color transparency and conditional formatting is VERY powerful Part 1 - Power BI
Conditional Formatting and Transparency to develop user friendly reports Part II - Power BI
- AnonymousNot applicable
Hi Lauraeire_81,
I wanted to check if you had the opportunity to review the information provided. Please feel free to contact us if you have any further questions. If my response has addressed your query, please "Accept as Solution" and give a 'Kudos' so other members can easily find it.
Thank you,
Pavan.