Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.
Hello Community - I would like to do this in the query editor, but have the DAX reference as well for learning.
We have Orders. These orders begin with a prefix, like HS, AR, CO, etc.
The HS and AR orders, below $40k value, are part of a particular sales channel. I would like the custom column to return the value "QuickShip" if the Order prefix begins with either HS or AR, and if the Order value is equal or less than $40k.
Solved! Go to Solution.
Hi @Anonymous
Here's a sample PBIX file with the following data and code.
Based on this sample data
This will do the job
= if (Text.Start([Order],2) = "HS" or Text.Start([Order],2) = "AR")
and [Shipped Price] <= 40000
then "QuickShip"
else null
Producing this output
Regards
Phil
If I answered your question please mark my post as the solution.
If my answer helped solve your problem, give it a kudos by clicking on the Thumbs Up.
Proud to be a Super User!
Thanks Phil - This was awesome and just what I needed!
Hi @Anonymous
Here's a sample PBIX file with the following data and code.
Based on this sample data
This will do the job
= if (Text.Start([Order],2) = "HS" or Text.Start([Order],2) = "AR")
and [Shipped Price] <= 40000
then "QuickShip"
else null
Producing this output
Regards
Phil
If I answered your question please mark my post as the solution.
If my answer helped solve your problem, give it a kudos by clicking on the Thumbs Up.
Proud to be a Super User!
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
109 | |
98 | |
77 | |
66 | |
54 |
User | Count |
---|---|
144 | |
104 | |
100 | |
86 | |
64 |