Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.
Hello:
I have made a tooltip and the dax code it works perfectly. Below is my code:
2021_Event_Type =
Switch(
Max('Table1'[WEEK]),
"1.6 W42", "Event1",
"1.7 W43", "Event2",
"2.8 W44", "Event3",
"2.8 W01", " ",
blank()
)
But now I want to add a condition week and FY = 2021
below is an incorrect code, but I want to do something like this:
2021_Event_Type =
Switch(
Max('Table1'[WEEK] & 'Table1'[FY] = 2021),
"1.6 W42", "Event1",
"1.7 W43", "Event2",
"2.8 W44", "Event3",
"2.8 W01", " ",
blank()
)
How can I do this?
Solved! Go to Solution.
@samnaw , Try like
2021_Event_Type =
Switch(
Max('Table1'[WEEK]) && MAX('Table1'[FY]) = 2021,
"1.6 W42", "Event1",
"1.7 W43", "Event2",
"2.8 W44", "Event3",
"2.8 W01", " ",
blank()
)
Hi @samnaw , could you clarify your expected result more clearly?
In your Switch function, the Max('Table1'[WEEK] & 'Table1'[FY] = 2021) is used to compare with the values of "1.6 W42"/"1.7 W43"/... , but obviously they cannot be compared. What's the logic of the condition you want to realize? Will '2021' be involved in the values to be compared?
Best Regards,
Community Support Team _ Jing Zhang
@samnaw , Try like
2021_Event_Type =
Switch(
Max('Table1'[WEEK]) && MAX('Table1'[FY]) = 2021,
"1.6 W42", "Event1",
"1.7 W43", "Event2",
"2.8 W44", "Event3",
"2.8 W01", " ",
blank()
)
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
114 | |
105 | |
77 | |
67 | |
63 |
User | Count |
---|---|
144 | |
107 | |
105 | |
82 | |
69 |