Forum Discussion

Lauraeire_81's avatar
Lauraeire_81
Icon for Helper I rankHelper I
1 year ago
Solved

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 

  • Anonymous's avatar
    Anonymous
    1 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

  • Anonymous's avatar
    Anonymous
    Not 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.

     

  • Anonymous's avatar
    Anonymous
    Not 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.