Forum Discussion
My Visuals look skewed/distorted.
In a table or matrix visual, when for a particular client filter is selected in the report, the data is not present, the visual get distorted and loose its original size in width. Is there a way this can we resolved so that the formatting remains consistent even without having any data?
3 Replies
- Learner_PowerBI
Helper I
Hi jubinsoni - I'm using matrix visual where the year column from date table is in columns and in values we have a measure which is calculating cases for last 3 years. So when for a client filter there is no data it gets skewed up and the width that we fixed for the measure gets disturbed.
- Learner_PowerBI
Helper I
Hi jubinsoni
That was really helpful. Thank you for the information. - jubinsoni
Memorable Member
Hi Learner_PowerBI,
This happens because a table or matrix sizes its columns from its content, so when the filter leaves nothing to show, the visual has no content to size from and shrinks. The fix is to take sizing out of the content's hands, or to make sure there is always something to show. Here are the options, from simplest to most involved.
Options
Option How Result Trade-off Fixed column widths In the visual format pane, turn off auto-size column width and set a width for each column The columns keep their size with or without data Widths no longer adapt when text gets longer, so choose widths with some room Fixed visual size and position Set the visual width and height in the General options (position and size) The visual frame stays the same Does not keep column widths by itself, so combine with fixed widths Show items with no data For the fields on the rows, enable the option to show items with no data Rows appear even without values Can show many empty rows, so use it only where the list is short A measure that always returns a value Add a measure to the table that returns zero instead of blank Keeps rows and columns present Zero values can mislead, so format them to show a dash Overlay message visual Place a card with a conditional message on top of the table that only appears when there is no data Clear message to the user, stable layout One more visual to maintain and align Measures that support the last two options
Rows For Layout = -- returns a value for every row of the visual so it never collapses [Sales] + 0 -- Message shown when the selected client has no data No Data Message = IF ( ISBLANK ( [Sales] ), "No data for the selected client" )As a rule, combine fixed column widths with a visible empty-state message. The fixed widths solve the distortion, and the message tells the user that an empty table is a result and not an error.
A note on where this belongs
This is a question about the standard table and matrix visuals rather than about building a custom visual, so it may get faster help in the report design forums as well. If you are building your own visual and need the same behavior there, say so, because the answer then moves to how the visual sets its own layout when it receives no data.
So my overall approach would be:
1. Turn off auto-size column width and set fixed widths 2. Fix the visual size and position 3. Add a no-data message measure or overlay card 4. Use show items with no data only where the list is shortAI-assisted drafting: AI was used to help structure and phrase this response. I reviewed and validated the technical content before posting.