Forum Discussion
vazmor
Helper II
7 years agoRank hyrachy with previus column
Hello, I ask for your help in order to do the following: I have a Matrix as the attachment I need to get the rank based on a brand level but the ranking is from the store. (The attached file is the f...
- 7 years ago
Hi vazmor ,
Try to add the following column to your table:
Rank = CALCULATE( COUNTROWS(Catalogo_Reporte_Diario); FILTER( ALL(Catalogo_Reporte_Diario); Catalogo_Reporte_Diario[Grand_Brand] = EARLIER(Catalogo_Reporte_Diario[Grand_Brand]) && Catalogo_Reporte_Diario[AMOUNT] < EARLIER(Catalogo_Reporte_Diario[AMOUNT]) ) )+1If you prefer to use a measure try the following:
Rank = CALCULATE( COUNTROWS(Catalogo_Reporte_Diario); FILTER( ALL(Catalogo_Reporte_Diario); Catalogo_Reporte_Diario[Grand_Brand] = SELECTEDVALUE(Catalogo_Reporte_Diario[Grand_Brand]) && Catalogo_Reporte_Diario[AMOUNT] < SELECTEDVALUE(Catalogo_Reporte_Diario[AMOUNT]) ) )+1Regards,
MFelix
MFelix
Super User
7 years agoHi vazmor ,
Try to add the following column to your table:
Rank =
CALCULATE(
COUNTROWS(Catalogo_Reporte_Diario);
FILTER(
ALL(Catalogo_Reporte_Diario);
Catalogo_Reporte_Diario[Grand_Brand] = EARLIER(Catalogo_Reporte_Diario[Grand_Brand]) &&
Catalogo_Reporte_Diario[AMOUNT] < EARLIER(Catalogo_Reporte_Diario[AMOUNT])
)
)+1
If you prefer to use a measure try the following:
Rank =
CALCULATE(
COUNTROWS(Catalogo_Reporte_Diario);
FILTER(
ALL(Catalogo_Reporte_Diario);
Catalogo_Reporte_Diario[Grand_Brand] = SELECTEDVALUE(Catalogo_Reporte_Diario[Grand_Brand]) &&
Catalogo_Reporte_Diario[AMOUNT] < SELECTEDVALUE(Catalogo_Reporte_Diario[AMOUNT])
)
)+1
Regards,
MFelix