qlik sense FirstSortedValue cannot display issue

Backgroud

we got the issue on FirstSortedValue , FirstSortedValue(Onborded_Date, Onborded_Date) AS Customer_First_Onborded_Date , it will display -(null) if met duplicate records. eg some records are have the same Onborded_Date.

about how to use the FirstSortedValue ,can goto the official help document: AggregationFunctions FirstSortedValue

  • FirstSortedValue(Onborded_Date, Onborded_Date), will show the first/oldest value ,but will be null if met duplicate records.
  • FirstSortedValue(Onborded_Date, -Onborded_Date), will show the last/newest value ,but will be null if met duplicate records.
Solution

So based on the FirstSortedValue function , we should add a Distinct to select value with duplicate records.

  • FirstSortedValue(Distinct Onborded_Date, Onborded_Date), will show the first/oldest value , can distinct from duplicate records.
  • FirstSortedValue(Distinct Onborded_Date, -Onborded_Date), will show the last/newest value, can distinct from duplicate records.
LOAD
FirstSortedValue(Distinct Customer_Onborded_Date, Customer_Onborded_Date) AS Customer_First_Onborded_Date,
FirstSortedValue(Distinct Customer_Onborded_Date, -Customer_Onborded_Date) AS Customer_Last_Onborded_Date,
最新回复(0)
/jishuJBXk1MfLAVOd_2FxlJ_2FiYhJdwKxDatnpBr6lw54A_3D_3D4489187
8