Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.
Hi everyone,
Currently we have a database (BD_Registros) where are registered some data from operations. Over this data, there is a column called "Estado" (status) that is getted comparing the input value with some ranges previously defined.
Now I want to add a counter of how many days keep a variable in some status, specially for those which are "fuera de rango" (out of range) and "Dentro de rango" (in range)/"En objetivo" (in objective).
I was doing this:
The column called "Dia_FueraRango" recieves the last date that a variable was registered as "Fuera de rango", but I have noted that previously of that date there is also other register event with the same variable also out of range, but it isn't taking this. (Its just taking the last value but I want to take the first date when the variable changes to "Fuera de rango" from other status)
The name of the table from photo is BD_Variables
Thank you in advance,
Hi @Anonymous ,
Could you pls provide some sample data for test?Remember to remove the confidential information.
Best Regards,
Kelly
Did I answer your question? Mark my post as a solution!
Hi Kelly,
Sure, let me show you:
As you can see, the variable EL-14 changes its status to "Fuera de rango" on July 16th, but with my code isn't taking this value, instead is taking just the last time that "Fuera de rango" status was setted (for today I mean, July 21st).
Thank you in advance,
Hi @Anonymous ,
Try to use below expression instead:
Dia_FueraRango=CALCULATE(
MIN(BD_REGISTROS[FECHA REAL].[Date]),
FITER(ALL(BD_REGISTROS),AND((BD_REGISTROS[Estado]="Fuera de rango"),(BD_REGISTROS[Nombre VariableX]=BD_VARIABLES[CodigoX]))))
If this doesnt help,could you pls share a sample .pbix file(can be editable) for test?
Best Regards,
Kelly
Did I answer your question? Mark my post as a solution!
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
97 | |
96 | |
81 | |
74 | |
66 |
User | Count |
---|---|
126 | |
106 | |
105 | |
86 | |
72 |