Forum Discussion

RashmitaR's avatar
RashmitaR
Helper IV
9 years ago
Solved

Rank values based on Month filter

Hi, I have the following columns, child library no. of views month month-year I wanted to find the rank of child librarues based on the number of views ,the rank must change according to the ...
  • Anonymous's avatar
    Anonymous
    9 years ago

    Hi RashmitaR,

     

    Based on test, it works on my side, below is the test sample:

     

     

    Merge the records:

     

    Table = DISTINCT( SELECTCOLUMNS(Test,"Child",Test[child_library],"Month",FORMAT( Test[month-year],"mmmm-yyyy"),"View Count",SUMX(FILTER(ALLSELECTED(Test),Test[month-year].[Month]=EARLIER(Test[month-year].[Month])&& Test[child_library]=EARLIER(Test[child_library])),Test[no. of views])))

     

     

    Rank measure:

    Rank = RANKX(ALLSELECTED('Table'),CALCULATE(SUM('Table'[View Count])),,DESC,Dense)

     

    Create a table visual and set columns to don’t summarize:

     

     

    I agree with BhaveshPatel’s point, if ‘Views_Rank_month-year’ is a calculated column instead of a measure, the rank values is fixed when you display in the table, so after you set the visual level filter, it just filter records for those rank values.  If it’s a measure, your issue may related to calculate columns, I would suggest you insert a new table, drag [Child_Library], [file Accessed], ‘View Count’, ‘Views_month-year’ and ‘Views_Rank_month-year’ to the table to find whether the missed records can display. Also please enable ‘Show items with no data’ for each field in the table.

     

     

     

    Regards,

    Xiaoxin Sheng