Forum Discussion
line chart/KPI disappears while selecting filter
- 5 years ago
Hi Anonymous ,
What do you mean by:
Is there any way/setting to handle this blank line charts.
The charts are base on the the information you have so for those filtered values probably there is no information.
Yes MFelix, If some value is filtered and there is no value/data in the chart/KPI, i would like to see zero but the visual shouldn't disappear or appear empty.
Hi Anonymous ,
In this case you need to make the use of a measure, that way you can influence the result.
Don't know what is your setup and if you are using a column from your model or a measure if you have a measure like this:
Total = SUM(Table[column])
This will show blanks if there aren't any values if you change your measure to:
Total = SUM(Table[column]) + 0
This will return 0 instead of blanks.
But be aware using this will affect all the visualization so looking at your chart if you have a continuous line because some values are blank abnd when you place it on the they don't show if you use the +0 then you will show those value look at the image below to better see what I mean.
This can be overcome maybe using a measure that checks if all your values are blank:
Total with blanks =
IF (
CALCULATE ( SUM ( 'Table'[Value] ); ALLSELECTED ( 'Table'[CAT] ) ) = BLANK ();
SUM ( 'Table'[Value] ) + 0;
SUM ( 'Table'[Value] )
)
As you can see below when I select two values that are blank the chart show a row with 0.
Check PBIX attach so you can play around. (don't mind the formatting of the axis is just to show the value