Forum Discussion
Help with converting DAX to M in most efficient way
- 5 years ago
bikelley Maybe:
= Table.AddColumn(#"Replaced Value1", "Region Adj", each if [Account.Sub_Region__c] = "iMETA" then "iMETA" else if [Account.Region__c] = "EMEA" then "EUR" else if Text.Contains([Region],"META") or Text.Contains([Region],"EMEA") then "EUR" else if [Account.Region__c] = "" and [Account.Sub_Region__c] ="" then [Region] else [Account.Region__c])
bikelley Seems like maybe:
= Table.AddColumn(#"Replaced Value1", "Region Adj",
each if [Account.Sub_Region__c] = "iMETA" then "iMETA"
else if [Account.Region__c] = "EMEA" then "EUR"
else if [Account.Region__c] = "" && [Account.Sub_Region__c] ="" then [Region]
else [Account.Region__c])Thank you so much for taking the time to look at my issue. I think your Power Query is good if I can add the condition. The issue that I am stuck in I also have to include the below condition when we using [Region] in the above Power Query. Because [Region] column has "META" and "EMEA", I need to change the name as below.
Can you please help me to add the below condition to Power Query (the best and efficient way)?
Contains([Region],"META") then "EUR"
Contains([Region],"EMEA") then "EUR"Again, thank you so much for your help and time.
- Greg_Deckler5 years ago
Community Champion
bikelley Maybe:
= Table.AddColumn(#"Replaced Value1", "Region Adj", each if [Account.Sub_Region__c] = "iMETA" then "iMETA" else if [Account.Region__c] = "EMEA" then "EUR" else if Text.Contains([Region],"META") or Text.Contains([Region],"EMEA") then "EUR" else if [Account.Region__c] = "" and [Account.Sub_Region__c] ="" then [Region] else [Account.Region__c])- bikelley5 years ago
Helper IV
Greg_Deckler Thank you so much, I think this should work, I will get back to you asap. After I check on this. Again, I truly appreciate your help.
- bikelley5 years ago
Helper IV
Greg_Deckler Thank you so much. This works for me. I really appreciate your help.