Forum Discussion
Enabling filter by check box
- Anonymous5 years ago
Hi Dunner2020
I think you can achieve your goal by building a unrelated slicer table and measure.
Due to I don't know your data model I build a sample table to have a test.
Sample Table:
Slicer Table:
Measure:
No of Event = VAR _Checkbox = SELECTEDVALUE ( Checkbox[Status] ) VAR _YES = SUMX ( FILTER ( 'Table', 'Table'[Category1] = "A" && 'Table'[Category2] = "BB" && 'Table'[Category3] = "Event1" ), 'Table'[QTY] ) VAR _NO = SUM ( 'Table'[QTY] ) RETURN IF ( HASONEFILTER ( Checkbox[Status] ), IF ( _Checkbox = "Yes", _YES, _NO ), "" )Build a card visual to show the measure result. By default it will show blank, select "No", it will show sum of all QTY without filter, select "Yes", it will show results filtered by filter1 (Category1 = "A"), filter2 (Category2 = "BB") and filter3 (Category3 = "Event1").
Result is as below.
Select No:
Select Yes:
You can download the pbix file from this link: Enabling filter by check box
Best Regards,
Rico Zhou
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hey Dunner2020 ,
Regarding your question, I have to admit that I have my problems understanding your requirement.
Please consider to create a pbix file that contains sample data, but still reflects the data model (https://docs.microsoft.com/en-us/learn/modules/design-model-power-bi/).
You can use this to enter data directly in Power BI Desktop: https://docs.microsoft.com/en-us/power-bi/connect-data/desktop-enter-data-directly-into-desktop. Upload the pbix file to onedrive or dropbox and share the link. If you are using Excel to create the sample data, share the xlsx as well.
Create columns that contain the expected results, use the sample data to explain how the result is derived from the sample data.
Regards,
Tom