The ultimate Microsoft Fabric, Power BI, Azure AI, and SQL learning event: Join us in Stockholm, September 24-27, 2024.
Save €200 with code MSCUST on top of early bird pricing!
Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and more. Get started
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!
Join the community in Stockholm for expert Microsoft Fabric learning including a very exciting keynote from Arun Ulag, Corporate Vice President, Azure Data.
Check out the August 2024 Power BI update to learn about new features.
User | Count |
---|---|
21 | |
19 | |
18 | |
17 | |
12 |
User | Count |
---|---|
36 | |
34 | |
20 | |
19 | |
14 |