Join us for an expert-led overview of the tools and concepts you'll need to pass exam PL-300. The first session starts on June 11th. See you there!
Get registeredPower BI is turning 10! Let’s celebrate together with dataviz contests, interactive sessions, and giveaways. Register now.
Hola Todos,
Tengo el siguiente problema, necesito buscar la diferencia entre dos numeros (kilometros) ubicados en la misma columna y sumar su diferencia a final de mes.
El problema principal es que la tabla tiene distintos TP_CODBEM y se informan en distintas fechas, por lo que aveces los kilometrajes no estan en orden, como se evidencia en la tabla
Agradeceria me ayudaran con una funcion que me ayude a solucionar.
@Daniels2204 , Try like
value = [TP_POS_CONT] - maxx(filter(table, table[TP_CODBEM] = earlier([TP_CODBEM]) && table[TP_DTORIGI] = earlier([TP_DTORIGI]) && table[TP_POS_CONT] < earlier([TP_POS_CONT])),[TP_POS_CONT])
Hi, @amitchandak
Forget to comment that the table is in Directquery mod and I found that MAXX is not compatible.
Thank You, @amitchandak
But when writing the formula as is, it generates the error with "="
Then, corrected the error showed up to "FILTER"
I wait for comments,
Cheers,
So for each TP_CODBEM you need to find the smallest and largest odometer reading and get the difference, right?
Hi, @lbendlin
I need for each TP_CODBEM to find the kilometers traveled for each month, subtracting the kilometers from each other and adding their result
User | Count |
---|---|
16 | |
14 | |
13 | |
12 | |
11 |
User | Count |
---|---|
19 | |
16 | |
15 | |
11 | |
9 |