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

Score big with last-minute savings on the final tickets to FabCon Vienna. Secure your discount

Reply
Anonymous
Not applicable

Show data in Category based on filter on item

Hello Experts,

 

I have data table where data is presented as Category -> Item and details of individual item.

See below sample.

CategoryItemQuantityPriceOther Columns
FruitsBanana19Some other data
FruitsApple86Some other data
FruitsMango10Some other data
FruitsOrange08Some other data
CerealsWheat13Some other data
CerealsOats93Some other data
CerealsRice33Some other data
DairyCow Milk 1%77Some other data
DairyCow Milk 2%72Some other data
DairyBuffalow Milk 1%47Some other data
DairyBuffalow Milk 2%08Some other data
DairyBuffalow Milk Full Fat24Some other data
DairyCheese21Some other data

 

I want to create a Slicer or Text Filter that shows details of all items in a category when an item in that category is searched.

Example:

If I use slicer or text filter to search for "Cheese" which is in Item Column I should see the table showing everything in dairy like below:

CategoryItemQuantityPriceOther Columns
DairyCow Milk 1%77Some other data
DairyCow Milk 2%72Some other data
DairyBuffalow Milk 1%47Some other data
DairyBuffalow Milk 2%08Some other data
DairyBuffalow Milk Full Fat24Some other data
DairyCheese21Some other data

 

1 ACCEPTED SOLUTION
amitchandak
Super User
Super User

@Anonymous , You need create an independent item, category table(  do not join with Table)

 

ItemCat =

Summarize(Table, Table[Item], Table[Category])

 

Use item slicer from this table

 

and use following measure example for all calculated meausre or use it as visual level filter

 

measure =

var _tab = summarize(Allselected(Itemcat), Itemcat[Cat])

return

calculate(Sum(Table[Value]), filter(Table, Table[Cat] in _tab))

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
amitchandak
Super User
Super User

@Anonymous , You need create an independent item, category table(  do not join with Table)

 

ItemCat =

Summarize(Table, Table[Item], Table[Category])

 

Use item slicer from this table

 

and use following measure example for all calculated meausre or use it as visual level filter

 

measure =

var _tab = summarize(Allselected(Itemcat), Itemcat[Cat])

return

calculate(Sum(Table[Value]), filter(Table, Table[Cat] in _tab))

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
Anonymous
Not applicable

Thanks Amit,

Editer Reply:
Okay, I applied the measure as filter on the original table in the view. I had to do 2 things -
1. Add a column as Value and make all of them "1".
2. Apply a filter "Value is 1" in the table.

Original Message Below:

Using Sum(Table[Value]) in the output function returns singular count, but not rows with each entry. Maybe I didn't fully understand how to do this!

Helpful resources

Announcements
August Power BI Update Carousel

Power BI Monthly Update - August 2025

Check out the August 2025 Power BI update to learn about new features.

August 2025 community update carousel

Fabric Community Update - August 2025

Find out what's new and trending in the Fabric community.