This time we’re going bigger than ever. Fabric, Power BI, SQL, AI and more. We're covering it all. You won't want to miss it.
Learn moreJoin the FabCon + SQLCon recap series. Up next: Power BI, Real-Time Intelligence, IQ and AI, and Data Factory take center stage. All sessions are available on-demand after the live show. Register now
Solved! Go to Solution.
Hi @KasRotodyne
please try
B_Inkoopbestemming =
SWITCH (
TRUE (),
'T_Inkoop Data& Financieel'[B_RequirementType] = 1, "Verkoop",
'T_Inkoop Data& Financieel'[B_RequirementType] = 2, "Productie",
'T_Inkoop Data& Financieel'[B_RequirementType] = 3, "Voorraad",
'T_Inkoop Data& Financieel'[B_RequirementType] = 4, "Kosten",
'T_Inkoop Data& Financieel'[B_RequirementType] = 5, "Ongepland"
)
I cannot read this language but I may guess. Please try
B_Inkoopbestemming =
SWITCH (
TRUE (),
'T_Inkoop Data& Financieel'[B_RequirementType] = "1", "Verkoop",
'T_Inkoop Data& Financieel'[B_RequirementType] = "2", "Productie",
'T_Inkoop Data& Financieel'[B_RequirementType] = "3", "Voorraad",
'T_Inkoop Data& Financieel'[B_RequirementType] = "4", "Kosten",
'T_Inkoop Data& Financieel'[B_RequirementType] = "5", "Ongepland"
)
Hi @KasRotodyne
please try
B_Inkoopbestemming =
SWITCH (
TRUE (),
'T_Inkoop Data& Financieel'[B_RequirementType] = 1, "Verkoop",
'T_Inkoop Data& Financieel'[B_RequirementType] = 2, "Productie",
'T_Inkoop Data& Financieel'[B_RequirementType] = 3, "Voorraad",
'T_Inkoop Data& Financieel'[B_RequirementType] = 4, "Kosten",
'T_Inkoop Data& Financieel'[B_RequirementType] = 5, "Ongepland"
)
I cannot read this language but I may guess. Please try
B_Inkoopbestemming =
SWITCH (
TRUE (),
'T_Inkoop Data& Financieel'[B_RequirementType] = "1", "Verkoop",
'T_Inkoop Data& Financieel'[B_RequirementType] = "2", "Productie",
'T_Inkoop Data& Financieel'[B_RequirementType] = "3", "Voorraad",
'T_Inkoop Data& Financieel'[B_RequirementType] = "4", "Kosten",
'T_Inkoop Data& Financieel'[B_RequirementType] = "5", "Ongepland"
)
Hey @KasRotodyne ,
you missed the first argument. This is what you want to compare against the values. In your case the value of the column.
This approach should work:
B_Inkoopbestemming =
SWITCH (
'T_Inkoop Data& Financieel'[B_RequirementType],
1, "Verkoop",
2, "Productie",
3, "Voorraad",
4, "Kosten",
5, "Ongepland"
)
You could also use a SWITCH with the TRUE as value to compare with. But that usually makes only sense if you want to compare different columns. For example if Country = "France", then return 100, if user = "Kas" then return 200.
The approach with SWITCH and TRUE would be like that, but as I said it wouldn't make sense here:
B_Inkoopbestemming =
SWITCH (
TRUE (),
'T_Inkoop Data& Financieel'[B_RequirementType] = 1, "Verkoop",
'T_Inkoop Data& Financieel'[B_RequirementType] = 2, "Productie",
'T_Inkoop Data& Financieel'[B_RequirementType] = 3, "Voorraad",
'T_Inkoop Data& Financieel'[B_RequirementType] = 4, "Kosten",
'T_Inkoop Data& Financieel'[B_RequirementType] = 5, "Ongepland"
)
If you need any help please let me know.
If I answered your question I would be happy if you could mark my post as a solution ✔️ and give it a thumbs up 👍
Best regards
Denis
Blog: WhatTheFact.bi
Follow me: twitter.com/DenSelimovic
Check out the April 2026 Power BI update to learn about new features.
If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.
A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.
| User | Count |
|---|---|
| 38 | |
| 38 | |
| 31 | |
| 22 | |
| 15 |
| User | Count |
|---|---|
| 74 | |
| 61 | |
| 31 | |
| 31 | |
| 23 |