Forum Discussion
Percentage from previous row
Thank you again mate! But with AllSelected I'm having the same result.
My formula is now this one:
Previo =
VAR EstadoPrev = CambiosEstado[ID_Estado] - 1
RETURN
DIVIDE (
CALCULATE ( ( CambiosEstado[Total_Solicitudes]) ),
CALCULATE (
CambiosEstado[Total_Solicitudes],
FILTER ( ALLSELECTED(CambiosEstado), CambiosEstado[ID_Estado] = EstadoPrev )
)
)
ID_Estado 2, 3 and 4 should have 1,00 Previo, and ID_Estado 5 should have 0,44. Now this is dividing all by 32, which is the total amount of Solicitudes.
Thank you!
- Vvelarde9 years agoCommunity Champion
hi cristiannt
Use This Measure:
PrevioM% = VAR EstadoPrev = MIN ( CambiosEstado[Estado] ) - 1 RETURN IF ( HASONEVALUE ( CambiosEstado[Estado] ), DIVIDE ( CALCULATE ( SUM ( CambiosEstado[Solicitudes] ) ), CALCULATE ( SUM ( CambiosEstado[Solicitudes] ), FILTER ( ALLEXCEPT ( CambiosEstado; CambiosEstado[Fecha] ), CambiosEstado[Estado] = EstadoPrev ) ) ) + 0 )- cristiannt9 years agoFrequent Visitor
Thanks Mate Vvelarde, but I'm still getting problems :( When I'm filtering by Fecha_Ingreso, this is still dividing by 32 Solicitudes
My measure right now is:
PrevioM% = VAR EstadoPrev = MIN ( CambiosEstado[ID_Estado] ) - 1 RETURN IF ( HASONEVALUE ( CambiosEstado[ID_Estado] ), DIVIDE ( CALCULATE ( DISTINCTCOUNT( CambiosEstado[ID_Solicitud] ) ), CALCULATE ( DISTINCTCOUNT( CambiosEstado[ID_Solicitud] ), FILTER ( ALLEXCEPT ( CambiosEstado, CambiosEstado[Fecha_Ingreso].[Date] ), CambiosEstado[ID_Estado] = EstadoPrev ) ) ) + 0 )I'm using a distinct count since the intention of the report is to check how many Solicitudes were passing though the Estados, so I'm forced to use this calculation.
Thank you
- Vvelarde9 years agoCommunity Champion
Hi, maybe you have a different structure or data model that i can't see.
If you want contact me by PM to send me your file with anonimize data or upload your PBIX and share it.