Forum Discussion

ElliotP's avatar
ElliotP
Icon for Post Prodigy rankPost Prodigy
10 years ago
Solved

Ranking Visualisation

Hi,   I've been learning DAX and powerbi the past few days and I've heard the suggestion to have a seperate date table as so it's easier to work with.   I have my seperate table for dates setup, ...
  • ElliotP's avatar
    ElliotP
    10 years ago

    Right; I've sorted it.

     

    Very Useful link which for some reason worked when i tried it this time around: http://www.dutchdatadude.com/power-bi-pro-tip-show-top-x-results-with-rankx-function/

     

    You do this by having your time as your axis. Your value as the number of (mine was number of sessions straight from my original dataset).

     

    You create two measures;

     

    First is:

    Number of Sessions = SUM('All Web Site Data'[Sessions])

    For the Number of Sessions.

    Second is:

    Top10-2 = RANKX(ALL('All Web Site Data'[Sessions]), [Number of Sessions])

    Which ranks all of the number of sessions, by the total number of sessions.

     

    You then apply the Second Measure to the Visual Level Filters and set it to "is less than or equal to" 10. I chose as I wanted to see the top 10, change as needed.

     

    Very cool; Loving powerbi but working through these things are incredibly time consuming (amazing forum btw)