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.
Fruit =
VAR PEER =
SWITCH (
TRUE (),
CONTAINSSTRING ( WORKGROUPSTATS[DNIS], "golden" ), "PEER",
CONTAINSSTRING ( WORKGROUPSTATS[DNIS], "jonagold" ), "PEER",
CONTAINSSTRING ( WORKGROUPSTATS[DNIS], "granny smith" ), "PEER",
CONTAINSSTRING ( WORKGROUPSTATS[DNIS], "peche" ), "PEER",
CONTAINSSTRING ( WORKGROUPSTATS[DNIS], "nectarine" ), "PEER",
CONTAINSSTRING ( WORKGROUPSTATS[DNIS], "meloen" ), "PEER",
CONTAINSSTRING ( WORKGROUPSTATS[DNIS], "ananas" ), "PEER",
"-"
)
VAR APPEL =
SWITCH (
TRUE (),
CONTAINSSTRING ( WORKGROUPSTATS[DNIS], "opel" ), "APPEL",
CONTAINSSTRING ( WORKGROUPSTATS[DNIS], "bmw" ), "APPEL",
CONTAINSSTRING ( WORKGROUPSTATS[DNIS], "mini" ), "APPEL",
CONTAINSSTRING ( WORKGROUPSTATS[DNIS], "rolls" ), "APPEL",
"-"
)
VAR KIWI =
SWITCH (
TRUE (),
CONTAINSSTRING ( WORKGROUPSTATS[DNIS], "stoel" ), "KIWI",
CONTAINSSTRING ( WORKGROUPSTATS[DNIS], "tafel" ), "KIWI",
CONTAINSSTRING ( WORKGROUPSTATS[DNIS], "raam" ), "KIWI",
CONTAINSSTRING ( WORKGROUPSTATS[DNIS], "deur" ), "KIWI",
CONTAINSSTRING ( WORKGROUPSTATS[DNIS], "vuur" ), "KIWI",
"-"
)
RETURN
Solved! Go to Solution.
Hi @wem ,
You can return only one variable using RETURN in dax.
If you want to return all the variables then you can concate those 3 variables and then you can return it.
If you have any queries then please let me know and if this is not working for you then please share your expected result so that I can help you.
Thank you.
Hi @wem ,
You can return only one variable using RETURN in dax.
If you want to return all the variables then you can concate those 3 variables and then you can return it.
If you have any queries then please let me know and if this is not working for you then please share your expected result so that I can help you.
Thank you.
Hi @KeyurPatel14 ,
The concatenation was exactly what I was looking for. I didn't expect to become the desired result this way.
Thank you very much for your suggestion/solution.
regards
Wim
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 |
---|---|
43 | |
23 | |
21 | |
15 | |
15 |
User | Count |
---|---|
45 | |
31 | |
30 | |
18 | |
17 |