Advance your Data & AI career with 50 days of live learning, dataviz contests, hands-on challenges, study groups & certifications and more!
Get registeredJoin us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM. Register now.
I am creating an 'IF' Query giving numbers between two values a text outcome but the text causes an error and I don't know why. Can someone please assist me? It's probably a simple fix.
The entire formula worked until I put text in after then.
Could you take a look and see if you know the solution:
IF ([CancelTime] - [StartTime]) >= Time.Minute(10) & ([CancelTime] - [StartTime]) <= Time.Minute (18) then "Yes" else ""
only the "Yes" is failing and I can't seem to resolve it.
I am writing this within the transform data section within 'Custom Column'
Solved! Go to Solution.
You will need to use this query.
1. In PQ, null is used not "" unlike Excel and DAX (though you can use "" also).
2. PQ is super case sensitive
3. For AND condition and is used not &.
= if Duration.TotalMinutes([CancelTime] - [StartTime]) >= 10 and Duration.TotalMinutes([CancelTime] - [StartTime]) <= 18 then "Yes" else null
You are trying to transform a time or number to text. I would use them true else false, then change to text later.
--Nate
You will need to use this query.
1. In PQ, null is used not "" unlike Excel and DAX (though you can use "" also).
2. PQ is super case sensitive
3. For AND condition and is used not &.
= if Duration.TotalMinutes([CancelTime] - [StartTime]) >= 10 and Duration.TotalMinutes([CancelTime] - [StartTime]) <= 18 then "Yes" else null
Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes!
Check out the October 2025 Power BI update to learn about new features.