March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount! Early bird discount ends December 31.
Register NowBe one of the first to start using Fabric Databases. View on-demand sessions with database experts and the Microsoft product team to learn just how easy it is to get started. Watch now
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 final result I want to obtain)
Rank = VAR IsCountryFiltred = ISFILTERED ( Catalogo_Reporte_Diario[Customer_Name] ) VAR IsTitleSeasonFiltered = ISFILTERED ( Catalogo_Reporte_Diario[Grand_Brand]) VAR IsTitleSeason = HASONEVALUE ( Catalogo_Reporte_Diario[Grand_Brand] ) RETURN IF ( ISBLANK ( [Amount] ), BLANK (), IF ( IsCountryFiltred && IsTitleSeasonFiltered, RANKX ( ALL ( Catalogo_Reporte_Diario[Customer_Name] ), [Amount],, DESC, SKIP ), IF ( IsTitleSeasonFiltered && NOT IsCountryFiltred, RANKX ( ALL ( Catalogo_Reporte_Diario[Retailer_Name] ), CALCULATE ( [Amount] ) ), BLANK () ) ) )
Solved! Go to Solution.
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]) ) )+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
Regards
Miguel Félix
Proud to be a Super User!
Check out my blog: Power BI em PortuguêsHi @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
Regards
Miguel Félix
Proud to be a Super User!
Check out my blog: Power BI em PortuguêsMarch 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!
Arun Ulag shares exciting details about the Microsoft Fabric Conference 2025, which will be held in Las Vegas, NV.
User | Count |
---|---|
125 | |
85 | |
69 | |
54 | |
45 |
User | Count |
---|---|
204 | |
105 | |
99 | |
64 | |
54 |