Skip to main content
Announcements
Have questions about Qlik Connect? Join us live on April 10th, at 11 AM ET: SIGN UP NOW
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])

Please add me Anil_Babu_Samineni to interact faster when reply back. Speak low think High.

Before develop something, think If placed (The Right information | To the right people | At the Right time | In the Right place | With the Right context)

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])

Please add me Anil_Babu_Samineni to interact faster when reply back. Speak low think High.

Before develop something, think If placed (The Right information | To the right people | At the Right time | In the Right place | With the Right context)
QFabian
Specialist III
Specialist III

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;

QFabian
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