Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.
Register now!The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more
HI Expert,
unable to use switch statement in 2 table in ssas cube
i have used the switch statement but it is not taking columns from more than one table
I created calculated colmun
=SWITCH(('Table1'[col1]="Opportunity Owner"),'Table1[col2],'Table2'[col1])
actually table1- dept ,empid
table2 deptid,deptname
table3 emp id,empname
switch statement used in
table1--->table3
table2--->table3
so using switch(table2,deptname=Central, table3.empaname)
else condition used lookupvalue and tried lookupvalue(table1.col2,table2.col1,table1.col1) so when join in central fact table then lookupvalue not working
empname is value not coming
suggestion please
Hello @Shreesefwere ,
Instead of providing just Table2[Col1] use LOOKUPVALUE function there and it will bring data from other table. Switch function dont have that ability to pull from different tables.
If this post helps, then please consider accepting it as the solution to help other members find it more quickly. Thank You!!
Hi Expert,
actually table1- dept ,empid
table2 deptid,deptname
table3 emp id,empname
switch statement used in
table1--->table3
table1--->table2
so using switch(table2,deptname=Central, table3.empaname)
empname is value not coming
The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!
| User | Count |
|---|---|
| 158 | |
| 132 | |
| 116 | |
| 79 | |
| 54 |