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

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.
cancel
Showing results for 
Search instead for 
Did you mean: 
kwoklimho
Partner - Contributor III
Partner - Contributor III

Qlik Sense Issue Fixing (Table)

Hi All,

As the attached image, the date should show 2/5/2019 on the second column.

How can I apply the logic to change the data position?

Regards,

Leo

1 Solution

Accepted Solutions
sugathirajkumar
Creator
Creator

DATE(MAX(AGGR(DATE(MAX(FakeDate),'D/M/YYYY'), UserID)),'D/M/YYYY')

 

load * inline [
UserID,FakeDate, CostCenter
1, 2/5/2019, B
1, 1/4/2019, A
2, 1/4/2019, C

];

View solution in original post

8 Replies
Arthur_Fong
Partner - Specialist III
Partner - Specialist III

Try this:

AGGR(MAX(IF(FakeDate<=Date,FakeDate)),UserID,CostCenter).

kwoklimho
Partner - Contributor III
Partner - Contributor III
Author

clipboard_image_0.png

I have tried the formula. However, it is not correct.

What I want is the second date should be null, only showing the first record and the third record.

Arthur_Fong
Partner - Specialist III
Partner - Specialist III

Do you mean you want to sort the null value as the last record?

kwoklimho
Partner - Contributor III
Partner - Contributor III
Author

UserIDFormula for DateCostCenter
12/5/2019B
1-A
21/4/2019C

Just like this way to show the content.

Gysbert_Wassenaar
Partner - Champion III
Partner - Champion III

Add the word NODISTINCT into the Aggr function: Aggr(NODISTINCT Max(...etc

Try this one as well: MAX(TOTAL <UserID> IF(FakeDate<=Date,FakeDate))

 


talk is cheap, supply exceeds demand
sugathirajkumar
Creator
Creator

Can i get your raw data?

sugathirajkumar
Creator
Creator

DATE(MAX(AGGR(DATE(MAX(FakeDate),'D/M/YYYY'), UserID)),'D/M/YYYY')

 

load * inline [
UserID,FakeDate, CostCenter
1, 2/5/2019, B
1, 1/4/2019, A
2, 1/4/2019, C

];

sugathirajkumar
Creator
Creator

clipboard_image_0.png