Forum Discussion

CMoppet's avatar
CMoppet
Helper IV
1 year ago
Solved

How to 'Hide' an Error Message Behind a Card

Hello, clever people!

 

I'm looking for a creative way to solve a problem, please.  In the screenshot attached, you can see a bar chart and accompanying table.  The dataset is too large for the table to display until it is filtered (there are loads of slicers that can be used to cut the data).  

I've laid a card on top with a measure to display the message "Please select a bar from the chart above to view data in the table".  The text then 'disappears' when a bar is selected, and data is visible in the table (seen in second attachment). 

I'd really like it if you couldn't see the error message (Query has exceeded...), but I'm unsure how to get around this.  I thought about using conditional formatting on the background of the card when the value is blank, but you can only do it with colour, not transparency.

Has anyone got other ideas for solving this, please?  How can I 'hide' the error message when the card text is displayed??

Thanks!

 

 

  • Hi CMoppet,

    One option would be to cover the table with a shape with conditional fill, but this would not allow for the correct use of the table.

    So I believe the best way is for you to create a measure were if countrows>limit (don't know hor much data it is), then filter all rows, else, just return a normal column. Set this measure in the filter panel.

     

    With an empty table, you can just hide the column headers with the shape as mentioned before.


    Here I did a small version of how you can have the table have no values if more than 20 rows are available.

     -----

     

    Here is the dax formula I used:

    FilteredRows =
    IF(
        CALCULATE(
            COUNTROWS(Winners),
            ALLSELECTED(Winners)
        ) <= 20,
        1,
        BLANK()
    )
     
    Remember to apply it in the filter panel and select "apply slicer". Also, take into account its not counting the amount of different values, but the amount of rows the table visual has.
     
    Hope this helps, it's certainly a quite interesting scenario!

3 Replies

  • Hi CMoppet,

    One option would be to cover the table with a shape with conditional fill, but this would not allow for the correct use of the table.

    So I believe the best way is for you to create a measure were if countrows>limit (don't know hor much data it is), then filter all rows, else, just return a normal column. Set this measure in the filter panel.

     

    With an empty table, you can just hide the column headers with the shape as mentioned before.


    Here I did a small version of how you can have the table have no values if more than 20 rows are available.

     -----

     

    Here is the dax formula I used:

    FilteredRows =
    IF(
        CALCULATE(
            COUNTROWS(Winners),
            ALLSELECTED(Winners)
        ) <= 20,
        1,
        BLANK()
    )
     
    Remember to apply it in the filter panel and select "apply slicer". Also, take into account its not counting the amount of different values, but the amount of rows the table visual has.
     
    Hope this helps, it's certainly a quite interesting scenario!
    • CMoppet's avatar
      CMoppet
      Helper IV
      Thank you for your help 🙂 Very much appreciated
  • Anonymous's avatar
    Anonymous
    Not applicable

    Hi CMoppet ,

     

    On the one hand, you can solve this error by trying to remove unwanted columns, optimising dax queries, etc. For detailed information, you can refer to the solution below:
    Solved: This visual has exceeded the available resources -... - Microsoft Fabric Community
    Solved: Re: Resources Exceeded This visual has exceeded th... - Microsoft Fabric Community

     

    On the other hand, you can try to give the report a default filter, as shown in your second image, and then re-filter it when you need to query for other conditions, thus avoiding the error message when querying for all.

     

     

    Best Regards,

    Clara Gong

    If there is any post helps, then please consider Accept it as the solution  to help the other members find it more quickly.