Forum Discussion
Filter from 2 different columns
Hi Team,
I need to create a filter from 2 different columns.
I want a filter from Colum Active_Status and Inactive_Status.
I need to give user a filter with Available and Not Active.
| IP Address | Active_Status | Inactive_Status |
| 10.214.168.41 | Available | |
| 10.214.168.40 | Available | |
| 10.214.168.42 | Not Active | |
| 10.217.37.168 | Not Active | |
| 10.217.37.162 | Available | Not Active |
If you only want Available and not active then create a column like this:
Status Check = SWITCH(TRUE(),
'Table'[Active_Status]="Available" && 'Table'[Inactive_Status]="Not Active","Available not active",blank())If you want Active, In Active and Available and In Active create a column like this:
Status Check = SWITCH(TRUE(),
'Table'[Active_Status]="Available" && 'Table'[Inactive_Status]="","Available",
'Table'[Active_Status]="" && 'Table'[Inactive_Status]="Not Active","Not Active",
'Table'[Active_Status]="Available" && 'Table'[Inactive_Status]="Not Active","Available not active")
6 Replies
- jaideepnemaSolution Sage
Hi Anonymous
Create a calculated column like this
Status Check = SWITCH(TRUE(),
'Table'[Active_Status]="Available" && 'Table'[Inactive_Status]="","Available",
'Table'[Active_Status]="" && 'Table'[Inactive_Status]="Not Active","Not Active",
'Table'[Active_Status]="Available" && 'Table'[Inactive_Status]="Not Active","Available not active")Please accept this a solution if your question is answered
Appreciate a kudos !!
- AnonymousNot applicable
- jaideepnemaSolution Sage
Anonymous
change the DAX as given below:Status Check = SWITCH(TRUE(),
'Table'[Active_Status]="Available" && 'Table'[Inactive_Status]="","Available",
'Table'[Active_Status]="" && 'Table'[Inactive_Status]="Not Active","Not Active",
BLANK())Please accept this a solution if your question is answered
Appreciate a kudos !!
- AnonymousNot applicable
I want Available and Not active, if I chane the DAX for
Status Check = SWITCH(TRUE(),
'Table'[Active_Status]="Available" && 'Table'[Inactive_Status]="","Available",
'Table'[Active_Status]="" && 'Table'[Inactive_Status]="Not Active","Not Active",
BLANK()).Irrespective of anything in Active_Status Column it should only pick Inactive.
There may be case where it has 2 status in Each colum but I want only Available and Not_Active
- jaideepnemaSolution Sage
If you only want Available and not active then create a column like this:
Status Check = SWITCH(TRUE(),
'Table'[Active_Status]="Available" && 'Table'[Inactive_Status]="Not Active","Available not active",blank())If you want Active, In Active and Available and In Active create a column like this:
Status Check = SWITCH(TRUE(),
'Table'[Active_Status]="Available" && 'Table'[Inactive_Status]="","Available",
'Table'[Active_Status]="" && 'Table'[Inactive_Status]="Not Active","Not Active",
'Table'[Active_Status]="Available" && 'Table'[Inactive_Status]="Not Active","Available not active")
- AnonymousNot applicable
Hi Anonymous.
You can also try to create a measure expression to compare with selections, then you can apply this on the visual level filter to filter records.
Applying a measure filter in Power BI
Notice: you need to use unconnected table fields as the source of filter or the filter effect will apply to your records before changes.Regards,
Xiaoxin Sheng