Forum Discussion
Not Displaying Values on Chart
I am working on a power bi line chart and I want to exclude records from my line chart without changing the values by doing so.
I have a dataset which gives me a number of products and the month in which they were sold. When I put this into a table and display the number of sales per month as a percentage I get the below with the "Null" value being the items that are not sold.
I need to be able to display months 1-12 on a line chart , not displaying the null however using them for the overall percentage total. When I filter to show only where month > 0 , I am excluding the cases with no sale date from the percentage calcualation and they all rise. Is there a way to display this on a chart , and just not show certain values ?
17 Replies
- v-frfei-msftCommunity Support
Hi Arranafc19 ,
To create a measure as below.
Measure = VAR alle = CALCULATE ( SUM ( Table1[sales] ), FILTER ( ALLSELECTED ( Table1 ), Table1[month] <> BLANK () ) ) VAR su = CALCULATE ( SUM ( Table1[sales] ), FILTER ( Table1, Table1[month] <> BLANK () ) ) RETURN IF ( MAX ( Table1[month] ) = BLANK (), BLANK (), DIVIDE ( su, alle ) )- Arranafc19Helper IV
Hi v-frfei-msft
Having looked at your solution , it looks as though you are excluding the null values from the percentage calculation which is not what I am looking for .
I need the value of sales for month null to be included in the percentage calcuation but not to be displayed on the chart , as I am trying to get a percentage closed per month of overall.
Is there a way to do this ?
- CmcmahanResident Rockstar
You can use the same measure for both.
Click the chart, and on the right, select month (or add it if needed) in Visual level filters > Advanced Filtering > Show items when the value: is not blank > Apply Filter