Forum Discussion

sspk's avatar
sspk
Frequent Visitor
10 months ago
Solved

Index value shows empty in the table view component?

Hello Team,

I am trying to display 15 rows per page in table. But as of now it shows only 14 records.

 

PageNumbers_wikiiiii = GENERATESERIES(1, 1000, 1)
RowsPerPage_wiki = 15
 
DynamicRowNumber_wikiii =
VAR _tableToRank =
    FILTER(
        ALLSELECTED('wiki_pages_trending_pop_points'),
        NOT(ISBLANK('wiki_pages_trending_pop_points'[Index])) // Exclude rows where Index is blank
    )
RETURN
    RANKX(
        _tableToRank,
        CALCULATE(MAX('wiki_pages_trending_pop_points'[Index])),
        ,
        ASC, // Sort by Index in ascending order
        SKIP // Use SKIP for unique, sequential ranks (1, 2, 3...)
    )
 
 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

First index values is always empty or null it shows in the table as shown in the diagram above. In my Power Query View I can see the Index column and data type as Whole Number. There is no Empty or null.

But i use the same column in the Field value it shows empty.?

 

Thanks and Regards,

Siva

  • sspk's avatar
    sspk
    10 months ago

    HI Anonymous ,

    Thank you for your reply.Yes you are correct RANKX is not calculated properly. So created a calculated column in the same table where index is created using Power Query Editor. for the Table,
    DRW  = 

    RANKX(
        ALL('wiki_pages_trending_pop_points'),
        'wiki_pages_trending_pop_points'[PopPoints] + 0.000001 * 'wiki_pages_trending_pop_points'[Index],
        ,
        DESC,   // PopPoints descending
        DENSE   // consecutive ranks, no skipped numbers
    )
    Both the column values are in the same Table. Now it looks fine,
     
     
     
     
     
     
     
    Thank you.

     

3 Replies

  • Anonymous's avatar
    Anonymous
    Not applicable

    Hi sspk,

     

    The ranking measure (RANKX) isn’t finding the first record properly in the current filter context. To fix it, make sure you’re showing the actual Index column in the table, not the ranking measure. If the issue is in the measure, modify it so it directly uses the selected index value for each row this ensures every row, including the first one, gets a rank. Also, if you’re using pagination, use the updated measure for filtering but display the real Index column to avoid blanks. Try below measure to fix the issue.

     

    DRN =
    VAR index = SELECTEDVALUE('wiki_pages_trending_pop_points'[Index])
    
    VAR tableToRank =FILTER(ALLSELECTED('wiki_pages_trending_pop_points'),
            NOT(ISBLANK('wiki_pages_trending_pop_points'[Index])))
    RETURN
    IF( NOT(ISBLANK(_index)),
        RANKX(tableToRank,
            'wiki_pages_trending_pop_points'[Index],,ASC,SKIP))
    

     

    Thanks & Regards,

    Prasanna Kumar

    • sspk's avatar
      sspk
      Frequent Visitor

      HI Anonymous ,

      Thank you for your reply.Yes you are correct RANKX is not calculated properly. So created a calculated column in the same table where index is created using Power Query Editor. for the Table,
      DRW  = 

      RANKX(
          ALL('wiki_pages_trending_pop_points'),
          'wiki_pages_trending_pop_points'[PopPoints] + 0.000001 * 'wiki_pages_trending_pop_points'[Index],
          ,
          DESC,   // PopPoints descending
          DENSE   // consecutive ranks, no skipped numbers
      )
      Both the column values are in the same Table. Now it looks fine,
       
       
       
       
       
       
       
      Thank you.

       

  • Anonymous's avatar
    Anonymous
    Not applicable

    Hi sspk,

     

    Great to hear that it’s working as expected on your end! If one of the responses resolved your issue, please consider marking it as the accepted solution. It will be helpful for others in the community who may face a similar issue.

     

    Thanks & Regards,

    Prasanna Kumar