Power BI is turning 10, and we’re marking the occasion with a special community challenge. Use your creativity to tell a story, uncover trends, or highlight something unexpected.
Get startedJoin us for an expert-led overview of the tools and concepts you'll need to become a Certified Power BI Data Analyst and pass exam PL-300. Register now.
Apologies if this was answered before.
I am having issues with my if and statements in power query.
=If [item1] = 1 and [item2] <> null then 1 else 0
Where [item2] just needs to have any text in the cells and [item1] has only either 1 or 0.
The query keeps on returning 0 even if all conditions are met. I feel "<> null" is where the issue is but im not sure,kinda new to this.
Solved! Go to Solution.
=If [item1] = 1 and Text.Combine({[item2],[item3],[item4]})<>"" then 1 else 0
=If [item1] = 1 and not List.Contains({null,""},Text.Trim([item2])) then 1 else 0
Hi, thank you very much for this but its still returning 0 as a result. I think I screwed up explaining what I was trying to do. Basically I'm trying to put the fx below to my query.
=IF(AND(D3=1,LEN(E3)>0,LEN(F3)>0,LEN(G3)>0),1,0)
=If [item1] = 1 and Text.Combine({[item2],[item3],[item4]})<>"" then 1 else 0
That's it! thank you so much daniel.
This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.
Check out the June 2025 Power BI update to learn about new features.
User | Count |
---|---|
8 | |
6 | |
6 | |
6 | |
5 |