Forum Discussion
Show data when selecting an option
I want you to click on a combobox (Data Segmentation), to show me the selected data.
For example.
In this image I have several comboboxes and when selecting a "client" that shows me the data of that client.
The only problem I have is that I already have the data in the table but I don't know if it can be "hidden" for as long as an option is selected.
Hi, Syndicate_Admin
According to your requirements description, my understanding is that you want to achieve that when you don't select the value of "Client" in the slicer of the report, you want to not display any value corresponding to the client or other values in the corresponding visual, right?
If that's the case, you can try my scheme to achieve this requirement, I made a simple example data based on your situation:
(1)You can start by creating a separate table for the "Client" field placed in a slicer and ensuring that there is no table-to-table relationship between this table and your primary table:
(2)Then you can write a measure for the corresponding value field placed in the visual like this:
Value_Slicer = var _selectedvalue=SELECTCOLUMNS('Slicer',"1",'Slicer'[Client]) return IF(ISFILTERED(Slicer[Client]),SUMX(FILTER('Table','Table'[Client] in _selectedvalue),'Table'[Value]),BLANK())(3)Then you can go to the visual and replace the corresponding value field with the measure you just created, and your requirements are realized:
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
3 Replies
- v-yueyunzh-msftCommunity Support
Hi, Syndicate_Admin
According to your requirements description, my understanding is that you want to achieve that when you don't select the value of "Client" in the slicer of the report, you want to not display any value corresponding to the client or other values in the corresponding visual, right?
If that's the case, you can try my scheme to achieve this requirement, I made a simple example data based on your situation:
(1)You can start by creating a separate table for the "Client" field placed in a slicer and ensuring that there is no table-to-table relationship between this table and your primary table:
(2)Then you can write a measure for the corresponding value field placed in the visual like this:
Value_Slicer = var _selectedvalue=SELECTCOLUMNS('Slicer',"1",'Slicer'[Client]) return IF(ISFILTERED(Slicer[Client]),SUMX(FILTER('Table','Table'[Client] in _selectedvalue),'Table'[Value]),BLANK())(3)Then you can go to the visual and replace the corresponding value field with the measure you just created, and your requirements are realized:
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
- Syndicate_AdminAdministrator
Is it mandatory that the tables are NOT related?
- v-yueyunzh-msftCommunity Support
Hi, Syndicate_Admin
Yes, we can't create relationships between tables for this method.
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