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.
Hello,
I would like to make an operation (substraction) on values from a same column and then show it on a different column.
I developped a small example for better understanding of what I'm trying to do:
Raw Data:
Tool # | Operation | Start |
Tool 1 | A | 5/12/2019 |
Tool 1 | B | 5/14/2019 |
Tool 1 | C | 5/18/2019 |
Tool 2 | A | 5/15/2019 |
Tool 2 | B | 5/18/2019 |
Tool 2 | C | 5/25/2019 |
What I'm trying to calculate:
Tool # | Turn Around Time |
Tool 1 | 6 |
Tool 2 | 10 |
TAT = Diff between start time of operation C and start time of operation A
I could work on my raw data (excel spreadsheet) directly to work this out but I wanted to know if I could do something in POWER BI directly
Thanks for the help
Sebastien
Solved! Go to Solution.
Hi @Anonymous ,
For your requirement, please create the measure below.
Measure = VAR s_a = CALCULATE ( MAX ( 'Table1'[Start] ), FILTER ( ALLEXCEPT ( 'Table1', Table1[ool #] ), 'Table1'[Operation] = "A" ) ) VAR s_c = CALCULATE ( MAX ( 'Table1'[Start] ), FILTER ( ALLEXCEPT ( 'Table1', Table1[ool #] ), 'Table1'[Operation] = "C" ) ) RETURN DATEDIFF ( s_a, s_c, DAY )
Here is the output.
Best Regards,
Cherry
Hi @Anonymous ,
For your requirement, please create the measure below.
Measure = VAR s_a = CALCULATE ( MAX ( 'Table1'[Start] ), FILTER ( ALLEXCEPT ( 'Table1', Table1[ool #] ), 'Table1'[Operation] = "A" ) ) VAR s_c = CALCULATE ( MAX ( 'Table1'[Start] ), FILTER ( ALLEXCEPT ( 'Table1', Table1[ool #] ), 'Table1'[Operation] = "C" ) ) RETURN DATEDIFF ( s_a, s_c, DAY )
Here is the output.
Best Regards,
Cherry
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 |
---|---|
62 | |
61 | |
52 | |
39 | |
24 |
User | Count |
---|---|
85 | |
57 | |
45 | |
43 | |
38 |