Forum Discussion

darkhorse12's avatar
darkhorse12
New Member
4 years ago
Solved

Get row value from specific column

Hey, I am new to Power BI, 

 

I have 2 columns,

and I want to get comments when I am on that report page.

 

Report Page Comment
Cycle timeNote: calculated cycle time
Delivery timeNote: delivered
load timeNote: 2.5 hours
detailed cycle timeNote: calculated detailed cycle time

 

I have created measure:

Note for Cycle Time =
var result = FILTER(ALLSELECTED(Notes[Comment]),
RANKX(ALLSELECTED(Notes[Comment]),Notes[Comment],,DESC)=3)
RETURN result
 
 
but not getting perfect values.
 
Does anyone suggest me?
 
thanks.
 

4 Replies

  • JirkaZ's avatar
    JirkaZ
    Solution Specialist

    What is the expected outcome? I kind of don't understand why you're using ranking in your DAX. 

  • darkhorse12 , Try to use TOPN

     

    CALCULATE([Comments],TOPN(10,allselected(Notes[Comment]),[Comments] ,DESC),VALUES(Notes[Comment]))

     

    or first create a rank Assuming Comment is measure, count of comment or something like that

    Rank =RANKX(ALLSELECTED(Notes[Comment]),Notes[Comment],,DESC)

     

    Then a measure

    sumx(filter(values(Notes[Comment]), [Rank] =3) ,[Comment] )