Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Want to see what's currently in public preview? We've pulled it all together in one place. Check it out here
cancel
Showing results for 
Search instead for 
Did you mean: 
Micki
Creator
Creator

FirstSorted showing value not at the needed row

Hi folks, 

I have a very basic measure with firs sorted function,

sum(AGGR(
		IF(FirstSortedValue(DISTINCT LastResultOutcome, -TIMESTAMP(AnalyticsUpdatedDate)) = 'Failed', 1,0), Title))

 It's working good but showing value not on the needed row so if you see instead of 0 should be 1.

 

Micki_1-1602856091307.png

Does it naturally for FirstSortedvalue or it's possible to change somehow? 

Thanks 

 

1 Solution

Accepted Solutions
sunny_talwar
MVP
MVP

@Micki Try this

If(FirstSortedValue(TOTAL <T1.TITLE> T2.OUTCOME, -T2.HISTORY) = 'Passed' and T2.HISTORY = Max(TOTAL <T1.TITLE> T2.HISTORY), 1,0)

View solution in original post

4 Replies
sunny_talwar
MVP
MVP

@Micki what all dimensions do you have in the chart? The row above should be 0, and the highlighted row should be 1?

Micki
Creator
Creator
Author

Hi @sunny_talwar ,

Micki_7-1603099520244.png

 

sunny_talwar
MVP
MVP

@Micki Try this

If(FirstSortedValue(TOTAL <T1.TITLE> T2.OUTCOME, -T2.HISTORY) = 'Passed' and T2.HISTORY = Max(TOTAL <T1.TITLE> T2.HISTORY), 1,0)
Micki
Creator
Creator
Author

 thank you @sunny_talwar , based on your answer i edit a little bit measure and now it's working