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 moreDid you hear? There's a new SQL AI Developer certification (DP-800). Start preparing now and be one of the first to get certified. Register now
Hello everyone
I'm trying to build up some calculation like this for a visual of stock management between multiple warehouses
Table: Butikk
Columns: Warehouse number, item, Itemclass, sales code
column1 = IF('Butikk'[Itemclass]) equals 2 and ('butikk'[sales code]) equals 7 or 8 or 99
then "True" els "false"
column2 = IF('Butikk'[itemclass]) equals 1 and ('butikk'[sales code]) equals 1 or 2 or 3 or 4 or 5
then "True" els "false"
Result = IF('Butikk'[column1]) equals "true" and ('butikk'[column2]) equals "true" then "True" els "False"
Now i also need it to tell me if a warehouse has the item as false, i want it to show me what warehouse has it in true.
So that warehouse can ship it to the other. If the item class 1 and has a sales code betwene 1-5 it means it sels well. item class 2 and 7,8,99 means its bad
Warehouse numbers
L10, L20, L30, L40, L50, L60
I just wrote this so illustrait what im trying to do, i am very new to writing DAX. So any help would be amazing 🙂
Solved! Go to Solution.
Make a Calculated Column:
column1 = IF(
AND( 'Butikk'[Itemclass]' = 2, 'Butikk'[sales code] = 7 || 'Butikk'[sales code] = 8 || 'Butikk'[sales code] = 9
), "True", "False"
)
column2 and Result, same concept.
For the warehouse part, you're gonna have to put in more context on defining the problem.
Make a Calculated Column:
column1 = IF(
AND( 'Butikk'[Itemclass]' = 2, 'Butikk'[sales code] = 7 || 'Butikk'[sales code] = 8 || 'Butikk'[sales code] = 9
), "True", "False"
)
column2 and Result, same concept.
For the warehouse part, you're gonna have to put in more context on defining the problem.
Hey FMX thanks alot for the help so far
I am getting an error with this formula though
Any ideas?
Check your "," and ";".
Great that worked!
Thank you sir
Looks like what you need is a nesting of SWITCH(), IF(), AND(), and OR() on a calculated column.
https://msdn.microsoft.com/en-us/library/gg492166.aspx
https://msdn.microsoft.com/en-us/library/ee634824.aspx
https://msdn.microsoft.com/en-us/library/ee634824.aspx
https://msdn.microsoft.com/en-us/library/ee634951.aspx
Check out the April 2026 Power BI update to learn about new features.
Sign up to receive a private message when registration opens and key events begin.
If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.
| User | Count |
|---|---|
| 34 | |
| 32 | |
| 25 | |
| 21 | |
| 16 |
| User | Count |
|---|---|
| 61 | |
| 49 | |
| 28 | |
| 23 | |
| 23 |