Forum Discussion
acg
3 years agoResolver I
Conditional statements across different tables
I have two tables looking at schemes and their activity levels. I need to create a new variable (Retail / Default) that takes different conditional scenarios across these two tables into account. ...
- 3 years ago
After some discussion in the team, this is the solution:
Scheme type = VAR ActiveDefault = 'Question Library KSAR'[Active/Default] VAR RestrictedStatus = RELATED('Scheme'[Restricted Scheme Name]) RETURN SWITCH( TRUE(), ActiveDefault = "Active" && RestrictedStatus = "Yes", "Restricted", ActiveDefault = "Active" && RestrictedStatus = "No", "Retail", ActiveDefault = "Default" && RestrictedStatus = "Yes", "Restricted", ActiveDefault = "Default" && RestrictedStatus = "No", "Default", "Retail" )
ERD
3 years agoCommunity Champion
acg
3 years agoResolver I
ERD - I have added more explanation. What do you mean with: From what tables do you take data for this visual?
Essentially SQL imports. Table 1 and Table 2 are connected via Scheme ID. The Retail\Default variable is that new variable that needs to be built based on the conditions explained above.