Forum Discussion
Conditional Column Based on Multiple Conditions
- 3 years ago
Hi kartiklal70 ,
Please try:
First Duplicate the Milestones table and delete the relationship between the new table and SR:
Then use the new table to create a table visual in page 2
Apply the measure to the visual level filter:
Measure = VAR _a = SELECTEDVALUE ( 'SR'[CSR] ) VAR _b = SELECTEDVALUE ( SR[Primary CSR YN] ) VAR _c = SELECTEDVALUE ( SR[Primary CSR] ) RETURN SWITCH ( TRUE (), _b = "Yes" && MAX ( 'Milestones2'[CSR] ) = _a, 1, _b = "No" && ( MAX ( 'Milestones2'[CSR] ) = _c && MAX ( 'Milestones2'[Related Record] ) IN { "Site", "SR" } ), 1, _b = "No" && MAX ( 'Milestones2'[CSR] ) = _a, 1 )Final output:
Best Regards,
Jianbo Li
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi kartiklal70 ,
Please try:
First Duplicate the Milestones table and delete the relationship between the new table and SR:
Then use the new table to create a table visual in page 2
Apply the measure to the visual level filter:
Measure =
VAR _a =
SELECTEDVALUE ( 'SR'[CSR] )
VAR _b =
SELECTEDVALUE ( SR[Primary CSR YN] )
VAR _c =
SELECTEDVALUE ( SR[Primary CSR] )
RETURN
SWITCH (
TRUE (),
_b = "Yes"
&& MAX ( 'Milestones2'[CSR] ) = _a, 1,
_b = "No"
&& (
MAX ( 'Milestones2'[CSR] ) = _c
&& MAX ( 'Milestones2'[Related Record] ) IN { "Site", "SR" }
), 1,
_b = "No"
&& MAX ( 'Milestones2'[CSR] ) = _a, 1
)
Final output:
Best Regards,
Jianbo Li
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Thank you for that. That's very helpful and I'm almost at the solution I need!
The only thing that needs to be updated now is that when we drllthrough for a non primary CSR (CSR-1969 in this case), we see CSR -1969 instead of CSR-0005 in the CSR column for Site/SR related records.
Any ideas on how to do that?