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

Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now

Reply
bm_data
Frequent Visitor

Filtering multiple columns from the same table

I have a Power app that writes data to a SharePoint list. It is a series of questions that all have a choice answer of "safe" or "unsafe". What I would like to do is pull all the questions where "unsafe" is the answer and then drill down by which specific question was answered "unsafe". There are probably 50 total questions (columns) that could have a value of "unsafe" so I was hoping to use a filter but unable to get that working. 

1 ACCEPTED SOLUTION

Hi, @bm_data 

 

You need to transform your data in Power Query. First, copy into 5 tables, each table with the first column and a Test.

For example, tables 1 and 2.

vzhangti_0-1668410782324.png

vzhangti_1-1668410819612.png

Select the test column and click Unpivot Column to turn each table into something like this.

vzhangti_2-1668411115827.png

Then use Append to merge these 5 tables together.

vzhangti_3-1668411252947.png

Result:

vzhangti_4-1668411268147.png

Go back to Desktop and use Dax to calculate the number of unsafes.

Measure = 
CALCULATE (
    COUNT ( Append1[Attribute] ),
    FILTER (
        ALL ( Append1 ),
        [Value] = "Unsafe"
            && [Attribute] = SELECTEDVALUE ( Append1[Attribute] )
    )
) + 0

vzhangti_5-1668411656747.png

If you want to click to view the details, you can put the fields you want to see in the tooltip.

vzhangti_6-1668411727028.pngvzhangti_7-1668411739868.png

 

Best Regards,

Community Support Team _Charlotte

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

View solution in original post

4 REPLIES 4
Marquian
Helper I
Helper I

What if the data was tabled differently? Would this process work for the data below?

AttributeSafeUnsafe
Test1MarketingMarketing
Test2SaleMarketing
Test3FacilitiesSale
Test4MarketingSale
Test5SalesFacilities
   
   

 

 

v-zhangti
Community Support
Community Support

Hi, @bm_data 

 

Can you provide sample data for testing? Sensitive information can be removed in advance. What kind of expected results do you expect? You can also show it with Excel. I look forward to your response.

 

Best Regards,

Community Support Team _Charlotte

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

bm_data_0-1668183419898.png

 

This is an rough example (missing date, creator, ect.) of what the data looks like. The expected outcome would be a bar chart showing each Test (column) that was unsafe tallied up. So the bar chart would be test1 =2, Test2 =2, Test3 =0, Test4 =3 and Test5 =4. Additionally I would like to then click into that bar and see the details of the unsafe values such as business unit, date and so on.

Hi, @bm_data 

 

You need to transform your data in Power Query. First, copy into 5 tables, each table with the first column and a Test.

For example, tables 1 and 2.

vzhangti_0-1668410782324.png

vzhangti_1-1668410819612.png

Select the test column and click Unpivot Column to turn each table into something like this.

vzhangti_2-1668411115827.png

Then use Append to merge these 5 tables together.

vzhangti_3-1668411252947.png

Result:

vzhangti_4-1668411268147.png

Go back to Desktop and use Dax to calculate the number of unsafes.

Measure = 
CALCULATE (
    COUNT ( Append1[Attribute] ),
    FILTER (
        ALL ( Append1 ),
        [Value] = "Unsafe"
            && [Attribute] = SELECTEDVALUE ( Append1[Attribute] )
    )
) + 0

vzhangti_5-1668411656747.png

If you want to click to view the details, you can put the fields you want to see in the tooltip.

vzhangti_6-1668411727028.pngvzhangti_7-1668411739868.png

 

Best Regards,

Community Support Team _Charlotte

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

Helpful resources

Announcements
Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

October Power BI Update Carousel

Power BI Monthly Update - October 2025

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

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.

Top Solution Authors