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.
Solved! Go to Solution.
Hi @Anonymous
The easiest way would be to add an extra Conditional Column in Power Query/Transform data specifying your conditions.
Happy to assist further if you can provide a data sample.
@Anonymous , In power query M you have If else
example
New Margin = ((if [Item.Brand] = "Brand 1" then 5 else
if [Item.Brand] = "Brand 2" then 5.5 else
if [Item.Brand] = "Brand 3" then 6.0 else
if [Item.Brand] = "Brand 4" then 6.5 else
7.0 )*([Qty]*[Price]) *((100-[Discount Percent])/100))/100
And text function https://docs.microsoft.com/en-us/powerquery-m/text-functions
with help of that you can do that
Hi @Anonymous
The easiest way would be to add an extra Conditional Column in Power Query/Transform data specifying your conditions.
Happy to assist further if you can provide a data sample.
Thank you @Mariusz this worked for me, but have since noticed that you can only include 1 conditional - eg: you can't say If column A = 5 AND Column B = 5 so for some other transformations I'm looking at other things. Having an issue with concatenating 2 columns now but will post a separate question I think.
By the way the dataset I'm trying to transform is Avi Singh's Ultimate Calendar table - I'm changing it to suit my companies fiscal year.
Ah yes thank you I hadn't found that, it looks like it could work I will try it - many thanks.
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.
User | Count |
---|---|
81 | |
42 | |
30 | |
27 | |
27 |