Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and more. Get started
Hi,
I have a set of values and I would like to select the latest value of RUL for each ICR and Inverter based on the Datetime created.
from the below table latest RUL for ICR1 and INV1 will be 40 where Datetime is 1/12/2021 11:46:10 AM
and for ICR4 and INV1, RUL will be 8.6 where Datetime is 1/12/2021 1:18:59 PM
ICR | Inverter | RUL | Datetime |
ICR1 | INV1 | 20 | 1/12/2021 10:32:59 AM |
ICR1 | INV2 | 30.5 | 1/12/2021 8:10:54 AM |
ICR1 | INV1 | 40 | 1/12/2021 11:46:10 AM |
ICR1 | INV2 | 10.4 | 1/12/2021 12:42:59 AM |
ICR4 | INV1 | 12.3 | 1/12/2021 7:12:59 AM |
ICR4 | INV1 | 23 | 1/12/2021 8:30:10 AM |
ICR2 | INV3 | 18 | 1/12/2021 9:13:59 AM |
ICR2 | INV3 | 44 | 1/12/2021 1:10:59 PM |
ICR4 | INV1 | 8.6 | 1/12/2021 1:18:59 PM |
Please suggest how to achieve this if i have to show the latest value of RUL for each ICR and Inverter in a matrix visual.
Thanks
Solved! Go to Solution.
@jitpbi , Try three measures like
last ICR = lastnonblankvalue(Table[Datetime], max(Table[ICR]))
last Inverter = lastnonblankvalue(Table[Datetime], max(Table[Inverter]))
last RUL = lastnonblankvalue(Table[Datetime], max(Table[RUL]))
Hi @jitpbi ,
According to your request, I did the following test, just create a calculated column. The idea is that the value returned by the current row is the RUL value corresponding to the latest date when the column ICR and the column Inverter are the same. The specific reference is as follows:
Result =
CALCULATE (
MAX ( 'Table'[RUL] ),
FILTER (
ALL ( 'Table' ),
'Table'[ICR] = EARLIER ( 'Table'[ICR] )
&& 'Table'[Inverter] = EARLIER ( 'Table'[Inverter] )
&& 'Table'[Datetime]
= CALCULATE (
MAX ( 'Table'[Datetime] ),
FILTER (
ALL ( 'Table' ),
'Table'[ICR] = EARLIER ( 'Table'[ICR] )
&& 'Table'[Inverter] = EARLIER ( 'Table'[Inverter] )
)
)
)
)
If the problem is still not resolved, please provide detailed error information and let me know immediately, looking forward to your reply.
Best Regards,
Henry
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
@jitpbi , Try three measures like
last ICR = lastnonblankvalue(Table[Datetime], max(Table[ICR]))
last Inverter = lastnonblankvalue(Table[Datetime], max(Table[Inverter]))
last RUL = lastnonblankvalue(Table[Datetime], max(Table[RUL]))
Check out the September 2024 Power BI update to learn about new features.
Learn from experts, get hands-on experience, and win awesome prizes.
User | Count |
---|---|
104 | |
99 | |
98 | |
41 | |
38 |
User | Count |
---|---|
151 | |
123 | |
79 | |
73 | |
71 |