Microsoft Fabric Community Conference 2025, March 31 - April 2, Las Vegas, Nevada. Use code FABINSIDER for a $400 discount.
Register nowThe Power BI DataViz World Championships are on! With four chances to enter, you could win a spot in the LIVE Grand Finale in Las Vegas. Show off your skills.
Hi,
If I use
Type of Sale = IF(insertBK[ClassOfBusiness] = "Bus Acc","BA",IF(insertBK[TrueCompany]="HOUSE ADVERT","House",IF(insertBK[iadclass] = 9014, "Local Remnant"," ")))
In a measure it works fine.
However if I try and to use it in a calculated column ie
#"Added Conditional Column" = Table.AddColumn(#"Removed Blank Rows", "Type of Sale", each if [ClassOfBusiness] = """BUS ACC""" then "BA" else if [TrueCompany] = """HOUSE ADVERT""" then "House" else if [iadclass] = 9014 then "Local Remnant" else if [SourceCode] = """BA430""" then "National" else if [SourceCode] = """CA148""" then "National" else if [SourceCode] = """HX355""" then "National" else if [SourceCode] = """MD301""" then "National" else "local" )
It doesnt work and only classifies 'Local Remant'.
Any ideas?
Thanks
Chris
Solved! Go to Solution.
The M code has duplicated double quotes, contrary to the DAX code.
@Anonymous powerquery is case sensitive, have you typed the condition exactly as it is in the data?
Proud to be a Super User!
The M code has duplicated double quotes, contrary to the DAX code.
March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!
Check out the February 2025 Power BI update to learn about new features.
User | Count |
---|---|
83 | |
78 | |
53 | |
39 | |
35 |
User | Count |
---|---|
92 | |
79 | |
51 | |
48 | |
45 |