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
bansikpopat
Frequent Visitor

Filtering 2 columns with different filter values in a table

I have created a table as below - 

bansikpopat_0-1673916050944.png

The last two columns - Total stock and QN are calculated columns. They are summation of different columns. 

I have a requirement to filter these last two columns on different conditions. 

"Total stock" needs to be filtered on Storage location = 

  • 0010
  • 0020
  • MDD
  • MDR

"QN" needs to be filtered on Storage location = 

  • ATQN
  • GGQN
  • RQTF
  • AQTF
  • ASEG

Storage location is another column in the same table. 

I need to diplay this in the same table that I attached. I am trying to automate the work that is done in excel into powerBI. In excel, I could manually choose the necessary filters per column and was able to get the desired table. 

 

I tried checking Filter function but I was not able to get the desired results. Could anyone please help. 

 

Thank you. 

1 ACCEPTED SOLUTION
amitchandak
Super User
Super User

@bansikpopat ,

New columns

Total Qty = Switch( True() ,

[ Storage location] in {"0010","0020","MDD","MDR"} , [Confirmed Qty],

blank()

)

 

 

QN = Switch( True() ,

[ Storage location] in {"ATQN",
"GGQN",
"RQTF",
"AQTF",
"ASEG"}
, [Confirmed Qty],

blank()

)

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
bansikpopat
Frequent Visitor

Thanks it worked. But I had to make a small change as I wanted to see the value of QN columns after filteration. 

QN Column =
SWITCH(
True(),
[Storage Location] in {"0010","0020","MDD","MDR"},
[QN], blank()
)
amitchandak
Super User
Super User

@bansikpopat ,

New columns

Total Qty = Switch( True() ,

[ Storage location] in {"0010","0020","MDD","MDR"} , [Confirmed Qty],

blank()

)

 

 

QN = Switch( True() ,

[ Storage location] in {"ATQN",
"GGQN",
"RQTF",
"AQTF",
"ASEG"}
, [Confirmed Qty],

blank()

)

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
July 2025 community update carousel

Fabric Community Update - July 2025

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

July PBI25 Carousel

Power BI Monthly Update - July 2025

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