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

Announcements
Join us to spark ideas for how to put the latest capabilities into action. Register here!
cancel
Showing results for 
Search instead for 
Did you mean: 
Jishnu
Contributor III
Contributor III

How to use max function to show a text value

Hi Team,

I have few data, in that i want to get the latest Date Status of a Task for particular time.

When i'm using 
If(Date=Max(Date) and Hour='14:00',[T4 -> QVD Status])
not getting the Status

Sample data is, (attached)

Jishnu_0-1620916485330.png

 

Could you please some one me.

Thanks,
Jishnu G S

1 Solution

Accepted Solutions
Anil_Babu_Samineni

Perhaps this? Hope you are trying this as calculated dimension?

If(Date=Aggr(Max(Date),Date) and Hour='14:00',[T4 -> QVD Status])

Best Anil, When applicable please mark the correct/appropriate replies as "solution" (you can mark up to 3 "solutions". Please LIKE threads if the provided solution is helpful

View solution in original post

4 Replies
Anil_Babu_Samineni

Perhaps this? Hope you are trying this as calculated dimension?

If(Date=Aggr(Max(Date),Date) and Hour='14:00',[T4 -> QVD Status])

Best Anil, When applicable please mark the correct/appropriate replies as "solution" (you can mark up to 3 "solutions". Please LIKE threads if the provided solution is helpful
QFabian
MVP
MVP

Hi, please try something like this :


Aux:
LOAD
"Date",
Task,
"Hour" / 24 as "Hour",
[T4 -> QVD Status] as Status
FROM [lib://desktop (fabian_fabian)/1eb7ed41-85b3-4426-966e-ae167f6d13f0.xlsx]
(ooxml, embedded labels, table is Sheet1);

left join
MaxDate:
Load
Task,
max(Date) as MaxDate
Resident Aux
group by
Task;

Result:
Load
*,
If(Date=MaxDate and Hour = 0.583333333, Status) as [T4 -> QVD Status]
Resident Aux;
drop table Aux;

Greetings!! Fabián Quezada (QFabian)
did it work for you? give like and mark the solution as accepted.
Jishnu
Contributor III
Contributor III
Author

Hi QFabian,

Thanks for your response.

I'm looking to use this as a calculated dimension.

Jishnu
Contributor III
Contributor III
Author

Hi Anil,

Thanks!

I have modified the script and got the result.

Thanks,
Jishnu G S