Forum Discussion

odeddror's avatar
odeddror
Advocate I
3 years ago
Solved

NBA Playoff

Hi there,

 

I created NBA Playoff tables (Eastern and Western conference) and I would like to pick (first 8 of 15) the teams like that

1 place and 8 place

2 and 7

3 and 6

4 and 5

* this table change every day during the legue and I would like to pick the team name regardless who is in the 1st raw
I've tried ranking but it didn't work and I coudn't create a row_num like TSQL with DAX any idea

Thanks

Oded DrorAs you can see today is Boston Vs Miami but tomorrow it could be different teams 

4 Replies

  • odeddror , try the newly released index function, with help of that you should be able to get data on a particular number , you can get 1 and 8 and show them together 

     

    Dax Function Offset, Window, Index: https://youtu.be/KhkCALjHylE

    • odeddror's avatar
      odeddror
      Advocate I

      Amit,

       

      In your video you are using numbers and dates but in my case it only dynamic names that need to extract

      Just show me the name of the 5th raw regardless who is there

       

      Thanks,

      Oded Dror

       

    • odeddror's avatar
      odeddror
      Advocate I

      Amit,
      I follow your video and i did

      Western Index 1 =
       VAR W1 = CALCULATE(SELECTEDVALUE(western[Team]), Index(1,ALLSELECTED(Western[Index]),ORDERBY(Western[Index])))
       VAR w8 = CALCULATE(SELECTEDVALUE(western[Team]), Index(8,ALLSELECTED(Western[Index]),ORDERBY(Western[Index])))
       Return
       W1 & " Vs. " & w8
       
      But as you can see (when is tie) it pick Phonix instead od golden state?
      Thnaks
      Oded Dror