March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount! Early bird discount ends December 31.
Register NowBe one of the first to start using Fabric Databases. View on-demand sessions with database experts and the Microsoft product team to learn just how easy it is to get started. Watch now
Hello,
I am trying to change some names in my column, but I am not sure how to give column names as default or on else. Can anybody please tell me. Please see below image,
The isseu is I am not sure how to reffer colunm name in If stament.
Thank you so much
Solved! Go to Solution.
@bikelley , Syntax is wrong , In dax it like
if([_rep>3] ,3,_rep) //if(<condition>, <then> ,<else>)
or is ||
and is &&
refer: https://docs.microsoft.com/en-us/dax/if-function-dax
Hi @bikelley
You cold try the following measure:
new accountname =
IF (
'Account Name'[Ac+A1:A19count Name-Hierarchy level 2] = "Ch"
|| 'Account Name'[Ac+A1:A19count Name-Hierarchy level 2] = "Chi"
|| 'Account Name'[Ac+A1:A19count Name-Hierarchy level 2] = "Chic",
"Chico",
'Account Name'[Ac+A1:A19count Name-Hierarchy level 2]
)
final you will get like below:
DAX IF:https://docs.microsoft.com/en-us/dax/if-function-dax
or in dax:||
and in dax:&&
if i answer your question,pls Mark my post as a solution,thanks!
Best Regard
Lucien Wang
Hi @bikelley
You cold try the following measure:
new accountname =
IF (
'Account Name'[Ac+A1:A19count Name-Hierarchy level 2] = "Ch"
|| 'Account Name'[Ac+A1:A19count Name-Hierarchy level 2] = "Chi"
|| 'Account Name'[Ac+A1:A19count Name-Hierarchy level 2] = "Chic",
"Chico",
'Account Name'[Ac+A1:A19count Name-Hierarchy level 2]
)
final you will get like below:
DAX IF:https://docs.microsoft.com/en-us/dax/if-function-dax
or in dax:||
and in dax:&&
if i answer your question,pls Mark my post as a solution,thanks!
Best Regard
Lucien Wang
@v-luwang-msft Thank you so much this works well for me too. Again, thanks for the help.
@bikelley , Syntax is wrong , In dax it like
if([_rep>3] ,3,_rep) //if(<condition>, <then> ,<else>)
or is ||
and is &&
refer: https://docs.microsoft.com/en-us/dax/if-function-dax
March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!
Arun Ulag shares exciting details about the Microsoft Fabric Conference 2025, which will be held in Las Vegas, NV.
User | Count |
---|---|
126 | |
82 | |
65 | |
54 | |
44 |
User | Count |
---|---|
194 | |
106 | |
92 | |
63 | |
51 |