Check your eligibility for this 50% exam voucher offer and join us for free live learning sessions to get prepared for Exam DP-700.
Get StartedDon't miss out! 2025 Microsoft Fabric Community Conference, March 31 - April 2, Las Vegas, Nevada. Use code MSCUST for a $150 discount. Prices go up February 11th. Register now.
Hi
I have a table that's built by referencing another table. Within the second table I need to create a custom column ith the following logic
If column X = 'xyz', then "yes"
If column Y = 'xyz', then "yes"
Otherwise "no"
I wrote the formula in DAX but the custom column function in PowerQuery appears to use a different language. Could anyone please help?
Solved! Go to Solution.
Hi @arb1782 ,
You could use the following syntax in "Add a custom column" window.
each if [X]="xyz" then "Yes" else if [Y]="xyz" then "Yes" else "No"
Did I answer your question ? Please mark my reply as solution. Thank you very much.
If not, please upload some insensitive data samples and expected output.
Best Regards,
Eyelyn Qin
Hi @arb1782 ,
You could use the following syntax in "Add a custom column" window.
each if [X]="xyz" then "Yes" else if [Y]="xyz" then "Yes" else "No"
Did I answer your question ? Please mark my reply as solution. Thank you very much.
If not, please upload some insensitive data samples and expected output.
Best Regards,
Eyelyn Qin
Thanks all
Use the Option in the ribbon to add a new conditional column and write the logic in the interface. You can select different columns.
For example:
Proud to be a Super User!
Paul on Linkedin.
Ah, I didn't spot that before, thanks! I've set it up as is following:
If column x CONTAINS 'xyz' then yes
OR if column y is equal to 'xyz' then yes
Otherwise No
Mhy remaining problem is that when column x is null, PBI returns error instead of No. Any ideas how to rectify this? There doesn't appear to be 'isnull' in the available criteria.
@arb1782 , Can you share sample data and sample output in table format? Or a sample pbix after removing sensitive data.
Can you see if this can help:https://eriksvensen.wordpress.com/2019/02/28/powerquery-replicate-doing-an-excel-vlookup-in-m/
March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount! Prices go up Feb. 11th.
Check out the January 2025 Power BI update to learn about new features in Reporting, Modeling, and Data Connectivity.
User | Count |
---|---|
146 | |
85 | |
66 | |
52 | |
47 |
User | Count |
---|---|
215 | |
90 | |
83 | |
66 | |
58 |