cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Anonymous
Not applicable

Ranking by YTD Measure

Hello Everyone how are you?

 

I was able to create the following table with the YTD measure, but now I would like to Rank this YTD.

 

YTDActual = TOTALYTD(AVERAGE(Audiencia_GE_LATAM_Raking[avg_rat_per]), Datas[Date], Datas[Date] < TODAY()) 
 
and then I created the rank 
RnkYTD = RANKX(ALLSELECTED(Audiencia_GE_LATAM_Raking[Channels]),CALCULATE([YTDActual]))
 
But if I do remove one channel from the table for example the rank 1 AOT Paga, the second in the rank becomes the 1 and so go on, I do not want this to happend and there is also another thing, there are a regions collum, if i put it into the filter, the rank also changes.
 
Could you please help me?
 
GuiGentil_0-1645045353783.png

 

 

 

1 ACCEPTED SOLUTION
Ashish_Mathur
Super User
Super User

Hi,

Try this measure

RnkYTD = RANKX(ALL(Audiencia_GE_LATAM_Raking[Channels]),CALCULATE([YTDActual]))

Regards,
Ashish Mathur
http://www.ashishmathur.com
https://www.linkedin.com/in/excelenthusiasts/

View solution in original post

4 REPLIES 4
Anonymous
Not applicable

Hello everyone.

 

I just created the following measure using the TOTALYTD.

 

rat_ytd= TOTALYTD(AVERAGE(Audiencia_GE_LATAM_Raking[avg_rat_per]), Datas[Date], Datas[Date] < TODAY())

 

Now I would like to rank this, using rankx or another function, could you please help?

 

I just want to rank the measure using or not the ytd.
 
Just to be cleared I already have the ytd with rating, I just want to rank now.
Ashish_Mathur
Super User
Super User

Hi,

Try this measure

RnkYTD = RANKX(ALL(Audiencia_GE_LATAM_Raking[Channels]),CALCULATE([YTDActual]))

Regards,
Ashish Mathur
http://www.ashishmathur.com
https://www.linkedin.com/in/excelenthusiasts/
Anonymous
Not applicable

Thank you, it worked

You are welcome.


Regards,
Ashish Mathur
http://www.ashishmathur.com
https://www.linkedin.com/in/excelenthusiasts/

Helpful resources

Announcements
May 2023 update

Power BI May 2023 Update

Find out more about the May 2023 update.

Submit your Data Story

Data Stories Gallery

Share your Data Story with the Community in the Data Stories Gallery.

Top Solution Authors