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

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
Anonymous
Not applicable

undefined

I have a three column i want a result like it select" T " from col1- and that should not contain 0 and null from col2 and col3 
col1    col2   col3           
A         1        null 
A         2         0
T        3          0
T       0          null
T       null      6

3 REPLIES 3
Anonymous
Not applicable

Hi @Anonymous ,

 

what's your meaning of "not contain 0 and null from col2 and col3",from your description, I know you want to filter col1,but I don't understand "not contain o and null", because unless you delete col2 and col3, if you filter on this table, it will show the whole row.

 

So can you give me your expected result? so that i can know what you want.

 

Best regards,

Community Support Team Selina zhu

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

Ashish_Mathur
Super User
Super User

Hi,

In the Query Editor, right click on the first column's heading and select "Unpivot Other Columns".  Filter the Value column with the criteria >0.  Does this help? 


Regards,
Ashish Mathur
http://www.ashishmathur.com
https://www.linkedin.com/in/excelenthusiasts/
Greg_Deckler
Community Champion
Community Champion

@Anonymous Maybe:

col4 = 
  SWITCH(TRUE(),
    [col1] = "T" && [col2] > 0 && [col3] > 0, TRUE(),
    FALSE()
  )


Follow on LinkedIn
@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
DAX For Humans

DAX is easy, CALCULATE makes DAX hard...

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

December 2025 Power BI Update Carousel

Power BI Monthly Update - December 2025

Check out the December 2025 Power BI Holiday Recap!

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.