Forum Discussion

f1254lipm's avatar
f1254lipm
Frequent Visitor
3 years ago
Solved

Adding a Measure to table shows all rows

Hi, I have created a simple RANKX measure to rank comments based on their date: 

RANKX(
   ALLSELECTED(Comments[Comment]),
CALCULATE(MIN(Comments[UpdatedOn])),,ASC))

and when I added this measure to a table or matrix with comments on rows, all comments in the Comments table appeared regardless of applied slicers. Is there a way to fix this?
Thanks,
Filip

  • Hi f1254lipm 

    please try

    IF (

    NOT ISEMPTY ( Comments ),

    RANKX(
       ALLSELECTED(Comments[Comment]),
    CALCULATE(MIN(Comments[UpdatedOn])),,ASC))
    )

2 Replies

  • tamerj1's avatar
    tamerj1
    Icon for Community Champion rankCommunity Champion

    Hi f1254lipm 

    please try

    IF (

    NOT ISEMPTY ( Comments ),

    RANKX(
       ALLSELECTED(Comments[Comment]),
    CALCULATE(MIN(Comments[UpdatedOn])),,ASC))
    )
  • f1254lipm's avatar
    f1254lipm
    Frequent Visitor

    Hi tamerj1, thank you so much! It works. The rows are now filtered correctly and the measure returns the correct rank.