Forum Discussion
Line and stacked column chart
Hello everyone,
I have a chart like this one:
Imagine that i have requests for help (that's my Column Values) and that can be solved by A or B, in this graph i only have A (that's my Line Values).
I have a Slicer where i can filter all, A or B. If i select all or A it's ok. But when i select B it is normal to do not show my line values on chart, but i want it to show the column values. Is this possible?
Hi Anonymous ,
According to your description, I create a sample.
The measure in the line chart is:
Measure = MAX('Table'[Sales])In my understanding, when B is selected in the slicer, you only want the line chart to disappear, but the values of A remains.
As the slicer and the chart are interactive, in order not to filter out A when B is selected, we should create a new slicer table like this:
Then relate the two tables with the category column.
Now create a new measure like amitchandak mentioned or directly modify the original measure.
Measure2 = IF ( SELECTEDVALUE ( 'Slicer'[Slicer] ) = "B", BLANK (), [Measure] )Put the slicer column in the new table in the slicer and get the expected result.
I attach my sample below for your reference.
Best Regards,
Community Support Team _ kalyjIf this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
2 Replies
- amitchandakSuper User
Anonymous , You have create a measure for line
Switch( True(),
hasonevalue(Table[Value]) && max(Table[Column]) = "B" , blank() ,
[Your measure]
)
If this does not help
Can you share sample data and sample output in table format? Or a sample pbix after removing sensitive data. - v-yanjiang-msftCommunity Support
Hi Anonymous ,
According to your description, I create a sample.
The measure in the line chart is:
Measure = MAX('Table'[Sales])In my understanding, when B is selected in the slicer, you only want the line chart to disappear, but the values of A remains.
As the slicer and the chart are interactive, in order not to filter out A when B is selected, we should create a new slicer table like this:
Then relate the two tables with the category column.
Now create a new measure like amitchandak mentioned or directly modify the original measure.
Measure2 = IF ( SELECTEDVALUE ( 'Slicer'[Slicer] ) = "B", BLANK (), [Measure] )Put the slicer column in the new table in the slicer and get the expected result.
I attach my sample below for your reference.
Best Regards,
Community Support Team _ kalyjIf this post helps, then please consider Accept it as the solution to help the other members find it more quickly.