Forum Discussion
Filter Chart as per Slicer Selection
- 3 years ago
Hi, E5254730
According to your description, you want to "when Closed is selected - just display the one's in light blue.If open - display the dark blue. If all - display both the Closed and open bars.".
For your need , i think we can not use the [Status] field in your table.
Here are the steps you can refer to :
(1)This is my test data:(2)We can create a new Table2 like this and we do not need to create any relationship between tables.
(3)Then we can modify your M3 and M6 measures like this:
M3 = var _slicer = VALUES('Table2'[Status]) return IF({"Closed"} in _slicer , DIVIDE([M2], [M1]))M6 = var _slicer = VALUES('Table2'[Status]) return IF({"Open"} in _slicer , DIVIDE([M5], [M4]))(4)Then we can put the 'Table2'[Status] as the slicer and we can put the fields we need on the bar visual and we can meet your need , the result is as follows:
Thank you for your time and sharing, and thank you for your support and understanding of PowerBI!
Best Regards,
Aniya Zhang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly
Hi, E5254730
According to your description, you want to "when Closed is selected - just display the one's in light blue.If open - display the dark blue. If all - display both the Closed and open bars.".
For your need , i think we can not use the [Status] field in your table.
Here are the steps you can refer to :
(1)This is my test data:
(2)We can create a new Table2 like this and we do not need to create any relationship between tables.
(3)Then we can modify your M3 and M6 measures like this:
M3 =
var _slicer = VALUES('Table2'[Status])
return
IF({"Closed"} in _slicer ,
DIVIDE([M2], [M1]))M6 =
var _slicer = VALUES('Table2'[Status])
return
IF({"Open"} in _slicer ,
DIVIDE([M5], [M4]))
(4)Then we can put the 'Table2'[Status] as the slicer and we can put the fields we need on the bar visual and we can meet your need , the result is as follows:
Thank you for your time and sharing, and thank you for your support and understanding of PowerBI!
Best Regards,
Aniya Zhang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly