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 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!
User | Count |
---|---|
20 | |
14 | |
11 | |
8 | |
6 |
User | Count |
---|---|
23 | |
23 | |
20 | |
15 | |
10 |