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
Hi All, I need help with my DAX query.
I am trying to create a custom column that has multiple criteria and conditions. In the first segment, the code works fine where I am simply assigning an existing column text to my new column. However when I get the Bold, Underline, Italic part of my code the values return as blank in my visualization. The second part of the code is meant to go through a specific column(line descrip), find text, and return a new "label" if account number and je category are a particular value as well. It could be my syntax or how i've written it, but i havent been able to find a function in dax that allows you to return a value you want other than T/F or a number. It essentially looks like this:
SWITCH(TRUE(),
(CanadaGL[account_number]) = "0", CanadaGL[gl_account_description],
(CanadaGL[account_number]) = "1", CanadaGL[gl_account_description],
(CanadaGL[account_number]) = "6", CanadaGL[gl_account_description],
(CanadaGL[account_number]) = "7", CanadaGL[gl_account_description],
(CanadaGL[account_number]) = "3", CanadaGL[gl_account_description],
(CanadaGL[account_number]) = "2", CanadaGL[gl_account_description],
(CanadaGL[account_number]) = "23", CanadaGL[gl_account_description],
(CanadaGL[account_number]) = "25", CanadaGL[gl_account_description],
(CanadaGL[account_number]) = "26", CanadaGL[gl_account_description],
(CanadaGL[account_number]) = "27", CanadaGL[gl_account_description],
(CanadaGL[account_number]) = "30", CanadaGL[gl_account_description],
(CanadaGL[account_number]) = "35", CanadaGL[gl_account_description],
(CanadaGL[account_number]) = "41", CanadaGL[gl_account_description],
(CanadaGL[account_number]) = "99", CanadaGL[gl_account_description],
(CanadaGL[account_number]) = "15", CanadaGL[gl_account_description],
(CanadaGL[account_number]) = "45", CanadaGL[gl_account_description],
(CanadaGL[account_number]) = "46", CanadaGL[gl_account_description],
(CanadaGL[account_number]) = "42", CanadaGL[gl_account_description],
(CanadaGL[account_number]) = "14", CanadaGL[gl_account_description],
CanadaGL[account_number]= "12", "Pineapple",
CanadaGL[account_number] = "40" && CanadaGL[je_category] = "Purchase Invoice", CanadaGL[vendor_name],
CanadaGL[account_number] = "40" && CanadaGL[je_category] = "Payroll" && SEARCH("Wellbeing", CanadaGL[line_description],"Mercer",)
CanadaGL[account_number] = "40" && CanadaGL[je_category] = "Payroll" && SEARCH("Grape",CanadaGL[line_description] ,"Grape"), "Not Mapped")
Any help would be really appreciated!
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 |
---|---|
22 | |
19 | |
17 | |
9 | |
5 |
User | Count |
---|---|
37 | |
29 | |
16 | |
14 | |
12 |