The ultimate Fabric, Power BI, SQL, and AI community-led learning event. Save €200 with code FABCOMM.
Get registeredCompete to become Power BI Data Viz World Champion! First round ends August 18th. Get started.
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
User | Count |
---|---|
28 | |
11 | |
8 | |
6 | |
5 |
User | Count |
---|---|
35 | |
14 | |
12 | |
9 | |
7 |