Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
2 years ago
Solved

Query for ranking

I have below data model 

 

Need to display below :

Most Purchased Item by Country

the most purchased product based on the age category less than 30 and above 30

 

  • Anonymous's avatar
    Anonymous
    2 years ago

    Hi Sergii24 

     

    The issue is resolved. I changed the crossfilteration to Both from Single in data model. 

    Started getting correct rank post that.

     

    Thanks!

4 Replies

  • Anonymous's avatar
    Anonymous
    Not applicable

    Hi Sergii24 

     

    The issue is resolved. I changed the crossfilteration to Both from Single in data model. 

    Started getting correct rank post that.

     

    Thanks!

    • Sergii24's avatar
      Sergii24
      Super User

      Great, I'm glad that you found a solution! 🙂

  • Hi Anonymous, so what exactly is your question to the community? How did you try to achieve the desired result and what exactly didn't work?

    • Anonymous's avatar
      Anonymous
      Not applicable

      Hi Sergii24 

       

      I need to display higlighted values as they are max purchased items for each country 

      trying to rank 

      = RANKX(ALL('Item'[Item]), COUNT('Order'[Item ID]), ,DESC
       
      but not working