The ultimate Fabric, Power BI, SQL, and AI community-led learning event. Save €200 with code FABCOMM.
Get registeredEnhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.
Hi Dear,
I´ve trying to do a code that display the last date that an equipment was repaired,but in a new event (register) that happened an new problem.
I got to do a measures but I need to do in a column calculated, and my measure code wasn´t work in a power query.
Example my code in a measures was that below:
column that I want | ||||
serial | Date IN | Date Out | last date out | |
A | 01/01/2020 | 05/01/2020 | none | None because no exist register before that |
B | 01/01/2020 | 06/01/2020 | none | |
C | 01/01/2020 | 05/01/2020 | none | |
A | 10/01/2020 | 15/01/2020 | 05/01/2020 | |
B | 12/01/2020 | 18/01/2020 | 06/01/2020 | |
C | 20/01/2020 | 24/01/2020 | 05/01/2020 | |
A | 01/02/2020 | 07/03/2020 | 15/01/2020 | |
B | 02/03/2020 | 07/03/2020 | 18/01/2020 | |
C | 20/03/2020 | 25/03/2020 | 24/01/2020 |
Solved! Go to Solution.
Try
last date out = maxx(filter(table,table[serial]=earlier(table[serial]) && table[Date Out] <earlier(table[Date Out])),table[Date Out])
Try
last date out = maxx(filter(table,table[serial]=earlier(table[serial]) && table[Date Out] <earlier(table[Date Out])),table[Date Out])
thanks for your help
Maybe : https://community.powerbi.com/t5/Quick-Measures-Gallery/Lookup-Min-Max/td-p/985814
Or See my article on Mean Time Between Failure (MTBF) which uses EARLIER: http://community.powerbi.com/t5/Community-Blog/Mean-Time-Between-Failure-MTBF-and-Power-BI/ba-p/3395...
User | Count |
---|---|
77 | |
76 | |
36 | |
31 | |
29 |
User | Count |
---|---|
93 | |
81 | |
57 | |
48 | |
48 |