The ultimate Fabric, Power BI, SQL, and AI community-led learning event. Save €200 with code FABCOMM.
Get registeredEnhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.
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 |
---|---|
27 | |
12 | |
8 | |
8 | |
5 |
User | Count |
---|---|
31 | |
15 | |
12 | |
7 | |
6 |