Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
kilala
Resolver I
Resolver I

Display result based on selected Category

Hi all,

In my fact table, I have Status Column which contains below:

- Open

- Partially Matched

- Matched

- Closed

I have created 5 status category using Shape as below:

 

kilala_1-1647841405431.png

Under the shapes, there would be a table. If user select "All Status", it will display all result from the table. If user click Open, it will only show records where Status = Open. 

 

How do I create measure for this?

 

Thank you.

1 ACCEPTED SOLUTION
amitchandak
Super User
Super User

@kilala , if these are row values of a column, You can create a slicer with select all. And the Choose orientation as horizontal https://docs.microsoft.com/en-us/power-bi/power-bi-slicer-filter-responsive

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

View solution in original post

2 REPLIES 2
ghoshabhijeet
Solution Supplier
Solution Supplier

@kilalaYou can use slicer instead of shapes to filter values. Also, you can skip "ALL STATUS" in the filter value if it's not required at all, since unselecting any slicer value will automatically show all data.

Presuming you will doing some calculation since your data is in fact table, I have created a sample data to answer your question. Please find below:

Data:

ghoshabhijeet_0-1647844376048.png

Showing sum of all values when no filter is selected:

ghoshabhijeet_2-1647844961519.png

Showing only values for Open status:

ghoshabhijeet_3-1647844994205.png

DAX measure used for this calculation:

Show data based on category =
IF (
SELECTEDVALUE ( Sheet1[Status] ) = "",
CALCULATE ( SUM ( Sheet1[Val] ), ALL ( Sheet1 ) ),
CALCULATE (
SUM ( Sheet1[Val] ),
FILTER ( Sheet1, Sheet1[Status] = SELECTEDVALUE ( Sheet1[Status] ) )
)
)

 

---------------------------------------------------------------------------------
** If you liked my solution, please give it a thumbs up. And if I did answer your question, please mark this post as a solution, so that it comes in top of the search. Thank you !

 

 

amitchandak
Super User
Super User

@kilala , if these are row values of a column, You can create a slicer with select all. And the Choose orientation as horizontal https://docs.microsoft.com/en-us/power-bi/power-bi-slicer-filter-responsive

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

December 2025 Power BI Update Carousel

Power BI Monthly Update - December 2025

Check out the December 2025 Power BI Holiday Recap!

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.