View My Drafts
Please see if the following helps you.
Result Set =
//Create a distinct table for values column in Table1 for the relevant Class no
VAR rlvntable =
VALUES ( Table1[Values] )
VAR resultset =
"FP" IN rlvntable
&& "MD" IN rlvntable,
CONCATENATEX ( rlvntable, Table1[Values], "," )
//avoid calculation if class no is not in scope
ISINSCOPE ( Table1[Class No] ),
The above is based on the assumption that the column [values] will have values other than "FP" & "MD". If the [values] column will have only "FP" or "MD", then in the above DAX, the 'CONCATENATEX' part can be replaced by MAX or similar function which returns a scalar value.
PFA the pbix file for your reference.
VAR DCount =
DISTINCTCOUNT ( 'Table'[Values] )
VAR DCountAll =
CALCULATE ( DISTINCTCOUNT ( 'Table'[Values] ), ALL ( 'Table' ) )
DCount = DCountAll,
CONCATENATEX ( 'Table', 'Table'[Values], ", " )