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

One column, two filters (using same field)

Hello community,

I think this is an data model issue but maybe there is a dax function that could be helpful

pbittt.PNG

As you can see above, I'm trying to use twice the same field in my report as filter. The first filter should be able to select from a,b to c and the second filter (same column) should be able to filter d,e. At least, I have a measure which concatenates all selected values from col2, like cocantenatex{value1,value2,value3}

It works fine but when I choose for example "a" from the first filter and "d" from the second filter, my measure is null.

jjkk.PNG

 

It would be great, if my measure would be able to capture all values from both filters (same column).

 

1 ACCEPTED SOLUTION
v-xiaotang
Community Support
Community Support

Hi @Anonymous 

you can try this, create 2 independent table, and put them into slicer,

table1 = SELECTCOLUMNS('Table',"col2",'Table'[col2])
table2 = SELECTCOLUMNS('Table',"col2",'Table'[col2])

then create the measure, it returns the selected value,

Measure = SELECTEDVALUE(table1[col2])&","&SELECTEDVALUE(table2[col2])

result

vxiaotang_0-1630551861147.png

 

Best Regards,

Community Support Team _Tang

If this post helps, please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

2 REPLIES 2
v-xiaotang
Community Support
Community Support

Hi @Anonymous 

you can try this, create 2 independent table, and put them into slicer,

table1 = SELECTCOLUMNS('Table',"col2",'Table'[col2])
table2 = SELECTCOLUMNS('Table',"col2",'Table'[col2])

then create the measure, it returns the selected value,

Measure = SELECTEDVALUE(table1[col2])&","&SELECTEDVALUE(table2[col2])

result

vxiaotang_0-1630551861147.png

 

Best Regards,

Community Support Team _Tang

If this post helps, please consider Accept it as the solution to help the other members find it more quickly.

amitchandak
Super User
Super User

@Anonymous , Create two independent tables on col 2

Tab1 = distinct(Table[Col2])

 

Tab2 = distinct(Table[Col2])

 

Now create measure

countrows(filter(Table, Table[Col2] in values(Tab1[Col2]))

 

Measure on slicer 2

 

countrows(filter(Table, Table[Col2] in values(Tab2[Col2]))

 

If need you can combine in single measure too

 

 

if needed refer similar example

How to use two Date/Period slicers :https://www.youtube.com/watch?v=WSeZr_-MiTg

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.

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.