Forum Discussion
Anonymous
3 years agoNot applicable
Help with Flag Column
Hi All, I have requirement to create a P_Flag column and use in slicer. When any one C_code associated with P_Codes have C_flag as Y then whole P_Flag should be assigned Y. Please find the O/P r...
- 3 years ago
Hi,
For this you need to create a disconnected table with the filter to be used in this case Y/N.
The create the following measure:
Flag_MEasure_filter = IF([P FLag Measure] in DISTINCT('Flag Filter'[Flag filter]), 1)Use this measure to filter the table and the column of the disconnected table to use has slicer result below and in attach file:
MFelix
3 years agoSuper User
Hi Anonymous ,
Try the following code:
Flag =
VAR P_CodeSelection = Table1[P_Code]
VAR temp_table =
SUMMARIZE (
ADDCOLUMNS (
FILTER ( DISTINCT(Table1[P_Code]), [P_Code] = P_CodeSelection ),
"FlagValue", RELATED ( Table2[C_Flag] )
),
[FlagValue]
)
RETURN
IF (
CONTAINSSTRING ( CONCATENATEX ( temp_table, [FlagValue] ), "Y" ) = TRUE (),
"Y",
"N"
)