Forum Discussion
Green_G
2 years agoFrequent Visitor
Populate a new column with data from conditional row
Hi, I am new to Power BI report building and I'm hoping you can help - I'm sure there is a simple solution but I don't know what it is! I have a table like the one below and want to create an...
- 2 years ago
Green_G you can write a measure like this
Measure2 = //what is the min event # by REF VAR one = CALCULATE ( MIN ( 'Table 1'[EVENT_NO] ), ALL ( 'Table 1' ), VALUES ( 'Table 1'[REF] ) ) // what is the source when event = one by ref VAR two = CALCULATE ( MIN ( 'Table 1'[SOURCE] ), FILTER ( ALL ( 'Table 1' ), 'Table 1'[EVENT_NO] = one && 'Table 1'[REF] = MAX ( 'Table 1'[REF] ) ) ) RETURN two
smpa01
Community Champion
2 years agoGreen_G you can write a measure like this
Measure2 =
//what is the min event # by REF
VAR one =
CALCULATE (
MIN ( 'Table 1'[EVENT_NO] ),
ALL ( 'Table 1' ),
VALUES ( 'Table 1'[REF] )
) // what is the source when event = one by ref
VAR two =
CALCULATE (
MIN ( 'Table 1'[SOURCE] ),
FILTER (
ALL ( 'Table 1' ),
'Table 1'[EVENT_NO] = one
&& 'Table 1'[REF] = MAX ( 'Table 1'[REF] )
)
)
RETURN
two