Forum Discussion
Anonymous
4 years agoNot applicable
if else statement in dax function
Hello All, I have a tableau dashboard where I have parameter having values like US and Canada,APAC and Overall. And I have department values like Central,Georgia,Hyd and Pune My requirement ...
Anonymous
4 years agoNot applicable
Yes amitchandak ,
As per your solution whenever I select US and Canada or APAC its not showing the respected departments that we writeen in the logic.
As per your dax function I am getting only regions instead of the department names
Sample Data :
| Department | Sales |
| Central | 100 |
| Georgia | 200 |
| Hyd | 300 |
| Pune | 400 |
Table I created in Power BI:
| Region Names |
| US and Canada |
| APAC |
Thats why I posted again
amitchandak
4 years agoSuper User
Anonymous , You do not need a table you need a column. If you have that table join with this column
Switch( True() ,
[Department] in {"Central","Georgia"} , "US and Canada",
[Department] in {"Hyd","Pune"} , "APAC",
"Other"
)
If this does work, Please share the final outcome on tableau
- Anonymous4 years agoNot applicable
Hi amitchandak ,
Below is what I am expecting .
In the DAX you mentioned above you are not using the table I created inside power BI for regions.