Learn from the best! Meet the four finalists headed to the FINALS of the Power BI Dataviz World Championships! Register now
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
| User | Count |
|---|---|
| 50 | |
| 39 | |
| 29 | |
| 18 | |
| 17 |
| User | Count |
|---|---|
| 66 | |
| 56 | |
| 40 | |
| 21 | |
| 19 |