Forum Discussion
Filter's Data between two table Help
- 5 years ago
Hi POWER_MI ,
You can put the version column in the matrix and apply this measure to replace the previous:
A = SWITCH ( SELECTEDVALUE ( Project[Project] ), "mother1", IF ( CALCULATE ( COUNTROWS ( FILTER ( 'Project', CONTAINSSTRING ( SELECTEDVALUE ( COLOR_FIELD_TO_ADD[Soon_Projet] ), 'Project'[Project] ) ) ), FILTER ( 'COLOR_FIELD_TO_ADD', 'COLOR_FIELD_TO_ADD'[Version] = "Version A" ) ) > 0, 1 ), "mother2", IF ( CALCULATE ( COUNTROWS ( FILTER ( 'Project', CONTAINSSTRING ( SELECTEDVALUE ( COLOR_FIELD_TO_ADD[Soon_Projet] ), 'Project'[Project] ) ) ), FILTER ( 'COLOR_FIELD_TO_ADD', 'COLOR_FIELD_TO_ADD'[Version] = "Version B" ) ) > 0, 1 ), "mother3", IF ( CALCULATE ( COUNTROWS ( FILTER ( 'Project', CONTAINSSTRING ( SELECTEDVALUE ( COLOR_FIELD_TO_ADD[Soon_Projet] ), 'Project'[Project] ) ) ), FILTER ( 'COLOR_FIELD_TO_ADD', 'COLOR_FIELD_TO_ADD'[Version] = "Version C" ) ) > 0, 1 ) )Attached the file in the below, hopes to help you.
Best Regards,
Community Support Team _ Yingjie Li
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Try:
Filter criteria =
VAR _Table1 = COUNROWS(
CALCULATETABLE(VALUES(Table2[Son Project]), table2[Son Project] IN {proj_soon-mother1})
VAR _Table2 = COUNROWS(
CALCULATETABLE(VALUES(Table2[Son Project]), table2[Son Project] IN {proj_soon-mother2})
RETURN
IF(SELECTEDVALUE(Table1) = "_mother1", _Table1, _Table2)
1) add a alicer to the page with the field from the MOTHER PROJECT
2) create a table/matrix visual with all columns from table 1 and add the [Filter Criteria] measure to the visual