Forum Discussion
Filter out rows based on two columns (in DAX)
- 4 years ago
Hi, GSPBI
You can create a measure and use it in filter pane to filter the row you want to show in table.
Since you have already written Check A, I will directly use column instead. My idea is to divide into two different situations.
Measure:
Measure = VAR a = COUNTX ( FILTER ( ALL ( 'Table' ), [Check A] = "Yes" && [Package] = SELECTEDVALUE ( 'Table'[Package] ) ), [Package] ) VAR b = IF ( MAX ( 'Table'[Planned/Actual] ) = "Actual" && a = 2, 1, IF ( MAX ( 'Table'[Check A] ) = "Yes" && a = 1, 1 ) ) RETURN bDid I answer your question ? Please mark my reply as solution. Thank you very much.
If not, please feel free to ask me.
Best Regards,Community Support Team _ Janey
Hi, GSPBI
You can create a measure and use it in filter pane to filter the row you want to show in table.
Since you have already written Check A, I will directly use column instead. My idea is to divide into two different situations.
Measure:
Measure =
VAR a =
COUNTX (
FILTER (
ALL ( 'Table' ),
[Check A] = "Yes"
&& [Package] = SELECTEDVALUE ( 'Table'[Package] )
),
[Package]
)
VAR b =
IF (
MAX ( 'Table'[Planned/Actual] ) = "Actual"
&& a = 2,
1,
IF ( MAX ( 'Table'[Check A] ) = "Yes" && a = 1, 1 )
)
RETURN
b
Did I answer your question ? Please mark my reply as solution. Thank you very much.
If not, please feel free to ask me.
Best Regards,
Community Support Team _ Janey
v-janeyg-msft Mohammad_Refaei Thank you very much for your help, I really appreciate it. Worked like a charm.