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

Enhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.

Reply
sparker95
Frequent Visitor

Create filter to select category in column but not filter all data

Below is a redacted version of table I have in PowerBI, I need to create a graph that shows the £/ft2 by Elemental Cost Plan.
However I want to also have a slicer that allows me to pick my Cladding values e.g 'Brick' and then only show that one value for the 'External Works' element of the 'Elemental Cost Plan'. I can create the slicer but I'm sturggling with the DAX measure. 

 

ProjectElemental Cost PlanSub ElementCladding£/ft2 Total £
BaselineSubstructureBasement 11557,160
BaselineSubstructureUnallocated 10506,509
BaselineFrame  14698,070
BaselineUpper Floors  16798,867
BaselineRoof  9459,154
BaselineStairs & Ramps  293,888
BaselineExternal Walls Brick442,259,539
BaselineExternal Walls Brickslip402,057,627
BaselineExternal Walls Precast261,337,458
BaselineExternal Walls Unitised603,086,441

 

1 ACCEPTED SOLUTION
Anonymous
Not applicable

Hi @HotChilli ,thanks for the quick reply, I'll add more.

Hi @sparker95 ,

The Table data is shown below:

vzhouwenmsft_0-1721974684945.png

Please follow these steps:

1. Use the following DAX expression to create a table for slicer

 

Table 2 = VALUES('Table'[Cladding])

 

2.Use the following DAX expression to create a measure

 

Measure = 
VAR _Slicer = VALUES('Table 2'[Cladding])
VAR _Elemental = SELECTEDVALUE('Table'[Elemental Cost Plan])
RETURN 
IF(_Elemental = "External Walls",SUMX(FILTER('Table','Table'[Cladding] IN _Slicer),[£/ft2 ]),SUM('Table'[£/ft2 ]))

 

3.Final output

vzhouwenmsft_1-1721974804749.png

vzhouwenmsft_2-1721974815415.png

 


Best Regards,
Wenbin Zhou

View solution in original post

4 REPLIES 4
Anonymous
Not applicable

Hi @HotChilli ,thanks for the quick reply, I'll add more.

Hi @sparker95 ,

The Table data is shown below:

vzhouwenmsft_0-1721974684945.png

Please follow these steps:

1. Use the following DAX expression to create a table for slicer

 

Table 2 = VALUES('Table'[Cladding])

 

2.Use the following DAX expression to create a measure

 

Measure = 
VAR _Slicer = VALUES('Table 2'[Cladding])
VAR _Elemental = SELECTEDVALUE('Table'[Elemental Cost Plan])
RETURN 
IF(_Elemental = "External Walls",SUMX(FILTER('Table','Table'[Cladding] IN _Slicer),[£/ft2 ]),SUM('Table'[£/ft2 ]))

 

3.Final output

vzhouwenmsft_1-1721974804749.png

vzhouwenmsft_2-1721974815415.png

 


Best Regards,
Wenbin Zhou

HotChilli
Super User
Super User

I think I see what you want. It would be a better idea to show the desired result, starting from the sample data. So please do that next time.

I think you can do this already by multi-selecting items in your slicer (blank will return the non-"external walls" and you can pick any one of the other values using ctrl click)

--

If I was doing it, I might add a column to give a value to all those blank/empty values in Cladding. So, in Power Query, something like:

if [Cladding] is empty/null then "Other" else [Cladding]

 

Create a slicer from this column (putting it in a dimension table and relating 1:n would be better) and then you can multi-select "Other" and any Cladding value.

Let me know how you get on.

sparker95
Frequent Visitor

Sorry typo I meant 'External Walls' , if you see the below screenshot. It would look like this setup, but rather than the 'Cladding' just filtering to External Walls, it would keep all other elements and then filter down the £/ft2 of 'External Walls' to only the selected value. E.g you select 'Brick' and the cost of External Walls would be £44/ft2. But all other elements would still show. ThanksCladding filter.PNG

HotChilli
Super User
Super User

Please show the desired result.  It's not clear what you are trying to do.

"only show that one value for the 'External Works' element of the 'Elemental Cost Plan" - what is this? 'External Works' element isn't anywhere in the table.

Helpful resources

Announcements
July PBI25 Carousel

Power BI Monthly Update - July 2025

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

Join our Fabric User Panel

Join our Fabric User Panel

This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.

June 2025 community update carousel

Fabric Community Update - June 2025

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