Power BI is turning 10! Tune in for a special live episode on July 24 with behind-the-scenes stories, product evolution highlights, and a sneak peek at what’s in store for the future.
Save the dateEnhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.
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 additional column called "ORIGINAL SOURCE" that shows the value in the SOURCE column for EVENT NO 1 in every row for the relevant REF VALUE.
REF | EVENT_NO | SOURCE |
001 | 1 | A |
001 | 2 | A |
001 | 3 | B |
001 | 4 | B |
001 | 5 | D |
002 | 1 | C |
002 | 2 | D |
002 | 3 | A |
002 | 4 | B |
002 | 5 | C |
002 | 6 | D |
So it will look like this:
REF | EVENT_NO | SOURCE | ORIGINAL SOURCE |
001 | 1 | A | A |
001 | 2 | A | A |
001 | 3 | B | A |
001 | 4 | B | A |
001 | 5 | D | A |
002 | 1 | C | C |
002 | 2 | D | C |
002 | 3 | A | C |
002 | 4 | B | C |
002 | 5 | C | C |
002 | 6 | D | C |
I would appreciate anyone's advice on the best way to achieve this.
Many Thanks,
Solved! Go to Solution.
@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
@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
Check out the July 2025 Power BI update to learn about new features.
This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.
User | Count |
---|---|
26 | |
10 | |
10 | |
9 | |
6 |