Forum Discussion
PROCX or EARLIER function in Power Query
Hi, angelobruch
I'm not sure I'm quite clear on your question, is the second image above the output you expect and you have implemented it with calculated column but want to optimize it?
Generating a calculated column will take up RAM and when you have a large amount of data using a calculated column will take up a lot of computer's RAM, will using a measure work? I created a measure using your formula to get the same result, does the measure help?
__Earlier_Desligado2 =
CALCULATE(
MIN('Medição de Químicos'[Data/Hora]),
FILTER(
ALL('Medição de Químicos'),
'Medição de Químicos'[Id]=max('Medição de Químicos'[Id])&&
'Medição de Químicos'[Estado Lógico]="0"&&
'Medição de Químicos'[Data/Hora]>=MAX('Medição de Químicos'[Data/Hora])
)
)
You mentioned that you used a function in Excel to get the desired result, there is a similar function LOOKUPVALUE in PowerBI, can you get the desired result if you use it in your formula instead?
By the way, if you wish to use PowerQuery for this, here is the PowerQuery forum, where there are many PowerQuery experts, and maybe you can get a quick solution there.
If you find a better solution, please let me learn it here.
Best Regards,
Community Support Team _ Zeon Zheng
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.