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.
¿Qué fórmula/medida se puede utilizar para calcular el número de días entre la última y la última pero una venta? Existe la siguiente tabla y es necesario calcular, por ejemplo, el número de días entre las ventas de la empresa1 el 10/21/2020 (último) y el 12/31/19 (penúltimo).
O simplemente puede sugerir cómo encontrar la penúltima venta de la empresa. Calcula el número de días entre que puedo yo mismo.
Solved! Go to Solution.
@SErgey-kuznetso , como nuevas columnas
Max Date á maxx(filter(Table, [company] á earlier([company])),[Date])
segundo last: maxx(filter(Table, [company] á earlier([company]) && [Date] < earlier([max Date]) ),[Date])
diff á datediff([segundo último],[max Date],day)
o como medidas
Max Date á maxx(filter(allselected(Table), [company] á max([company])),[Fecha])
segundo last: maxx(filter(allselected(Table), [company] á max([company]) && [Date] < max([max Date]) ),[Fecha])
diff á datediff([segundo último],[max Date],day)
@SErgey-kuznetso , como nuevas columnas
Max Date á maxx(filter(Table, [company] á earlier([company])),[Date])
segundo last: maxx(filter(Table, [company] á earlier([company]) && [Date] < earlier([max Date]) ),[Date])
diff á datediff([segundo último],[max Date],day)
o como medidas
Max Date á maxx(filter(allselected(Table), [company] á max([company])),[Fecha])
segundo last: maxx(filter(allselected(Table), [company] á max([company]) && [Date] < max([max Date]) ),[Fecha])
diff á datediff([segundo último],[max Date],day)
Prueba esta Medida. También estoy conectando la captura de pantalla con la salida:
No está claro, usa algo como esto.
DATEDIFF(DATE(2020,10,21),DATE(2019,12,31),DAY)
saludos
Manikumar
Proud to be a Super User!
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 |
---|---|
2 | |
1 | |
1 | |
1 | |
1 |
User | Count |
---|---|
2 | |
2 | |
2 | |
2 | |
1 |