Forum Discussion
jl20
9 years agoHelper IV
Avoiding Chained Lookup Tables
Hi, I know it's best practice to avoid multiple levels of lookup tables. However, how is this generally done in practice? I have abbreviated city names coming from the fact table, some of which g...
- 9 years ago
Hi jl20
You can create a Sort calculated column in your FACT table if you want to avoid the extra table and then use this as your sort col for your main table
Sort = SWITCH( TRUE() , -- IF/THEN --- 'Table'[Office] = "Atlanta" , 1 , 'Table'[Office]= "Chicago" , 2 , 'Table'[Office] = "Cleveland" , 3 ,
-- ELSE -- 999 )
Phil_Seamark
9 years agoMicrosoft Employee
Hi jl20
You can create a Sort calculated column in your FACT table if you want to avoid the extra table and then use this as your sort col for your main table
Sort = SWITCH(
TRUE() ,
-- IF/THEN ---
'Table'[Office] = "Atlanta" , 1 ,
'Table'[Office]= "Chicago" , 2 ,
'Table'[Office] = "Cleveland" , 3 ,
-- ELSE --
999 )