Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Kindly help me in the below logic in the measure:
I have the below formula:
SUM(Total_Transfer)
I want the sum of only those whose Transfer date is maximum means MAX(Transfer_date).
Something like that:
SUM({$<Transfer_date = {MAX(Transfer_date)}>}Total_Transfer)..
But it is not working.
Thanks and Regards
Deepanshu
What is
=Max(Uploaded_Date)
returning in a text box?
Maybe you need to use
$(=Date(Max({<Report_Type = {W}>} Uploaded_Date),'YYYY-MM-DD hh:mm:ss'))
May be this:
Sum({$<Transfer_date = {"$(=Date(Max(Transfer_date), 'YourDateFieldFormatHere'))"}>}Total_Transfer)
UPDATE: Max(Transfer_date) will return a number and to convert it to Date you will have to use Date function and also make sure that the formatting is also the same one as Transfer_date.
Max Transfer_date in the TOTAL context, right?
SUM({$<Transfer_date = {$(=Date(MAX(Transfer_date),'MM/DD/YYYY'))}>} Total_Transfer)
format the max date as Date using Date() function and using an appropriate format code ('MM/DD/YYYY' is just an example).
Attaching a sample where I used a particular kind of formatting to display Transfer_date (MMMM DD, YYYY)
Script:
Table:
LOAD Date(MakeDate(2015, 1, 1) + Ceil(Rand() * 365), 'MMMM DD, YYYY') as Transfer_date,
Ceil(Rand() * 1000000) as Total_Transfer
AutoGenerate 10000;
And then the expression I used:
Sum({$<Transfer_date = {"$(=Date(Max(Transfer_date), 'MMMM DD, YYYY'))"}>} Total_Transfer)
HTH
Best,
Sunny
Thanks a lot for your guidance!!
I am still getting error while using the formula. The date format is YYYY-MM-DD hh:mm:ss.
Attached is the snapshot of the formula I used.
Kindly help me!!
Regards
Deepanshu
What error message do you get? Have you tried to just press ok and check the result in your chart?
Like Stefan said, I don't see where the error is? Are you seeing null or 0s?
I am getting 0 value
Thanks
Deepanshu
Yes!!.. I am working on Qlik sense.. On the below it shows OK.
But still I am getting 0 value...
Please guide
Thanks!!
Deepanshu
Would you be able to share a sample?