Forum Discussion
Row based Column Flag
- Anonymous3 years ago
Hi shahzad667 ,
I have created a simple sample, please refer to it to see if it helps you.
Create a column.
Column = VAR _count = CALCULATE ( COUNT ( 'Table'[shift] ), FILTER ( 'Table', 'Table'[emplied] = EARLIER ( 'Table'[emplied] ) && 'Table'[shift] <> "Oncall" ) ) RETURN IF ( _count = 2, "Both", IF ( _count = 1, "Single", BLANK () ) )Then create a measure.
Measure = CALCULATE ( DISTINCTCOUNT ( 'Table'[emplied] ), FILTER ( ALL ( 'Table' ), 'Table'[Column] <> BLANK () && 'Table'[Column] = SELECTEDVALUE ( 'Table'[Column] ) ) )If I have misunderstood your meaning, please provide more details with your desired output and pbix file without privacy inforamtion.
Best Regards
Community Support Team _ Polly
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi shahzad667 ,
I have created a simple sample, please refer to it to see if it helps you.
Create a column.
Column =
VAR _count =
CALCULATE (
COUNT ( 'Table'[shift] ),
FILTER (
'Table',
'Table'[emplied] = EARLIER ( 'Table'[emplied] )
&& 'Table'[shift] <> "Oncall"
)
)
RETURN
IF ( _count = 2, "Both", IF ( _count = 1, "Single", BLANK () ) )
Then create a measure.
Measure =
CALCULATE (
DISTINCTCOUNT ( 'Table'[emplied] ),
FILTER (
ALL ( 'Table' ),
'Table'[Column] <> BLANK ()
&& 'Table'[Column] = SELECTEDVALUE ( 'Table'[Column] )
)
)
If I have misunderstood your meaning, please provide more details with your desired output and pbix file without privacy inforamtion.
Best Regards
Community Support Team _ Polly
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.