Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

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.

Reply
ArnoldData
Frequent Visitor

How to Rank between Weeks

Hello friends.

 

Today I stock with a situation, I need to rank the changes between 2 weeks.

 

I have a sales tables, where for example:

 

For week 30 I have on the top 3 items:

 

Cheese = 30$  

Pencil = 25$

Pen = 20$

 

But

for week 31 

Pencil = 30$

Pen = 28$ 

Cheese 25$

 

So I need to rank the changes between the weekends, If so, the cheese drop down 2 steps, the pencil rank up 1 step and the Pen had the same behavior.

 

I created to calculated measures, where I compare the sales between weeks, but I can´t do it with rank

 

Unidades Vendidas hasta el momento = SUM(

    'Detalle Productos'[Cantidad])
Unidades de Producto Semana Anterior = 

    CALCULATE([Unidades Vendidas Productos],

        FILTER(ALL('Calendar'),

            'Calendar'[Year] = SELECTEDVALUE('Calendar'[Year]) &&

            'Calendar'["#WeekNum"] = SELECTEDVALUE('Calendar'["#WeekNum"]) - 1)

)
Diferencias = 

 [Unidades Vendidas Productos] - [Unidades de Producto Semana Anterior]

 

ArnoldData_1-1660576781355.png

 

 

1 REPLY 1
lbendlin
Super User
Super User

Consider using a Ribbon Chart visual

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.