Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hello,
I have values based on reportdates,
Under current selection, I want to show value in KPI chart according to max date among repordate.
for example: I want to show 1100 since, it is the latest date value (19.04.2018). Note: Report_Date and PeggedQty are field name.
Report_Date | PeggedQty |
02.04.2018 | 500 |
06.04.2018 | 2500 |
13.04.2018 | 1500 |
19.04.2018 | 1100 |
thanks in advance
May be this:
FirstSortedValue(PeggedQty,-Report_Date)
thank you but it did not work. Maybe I explained my issue wrong.
I want to sum all latest date values.
I try that:
sum({$<Report_Date={"$(=max(Report_Date))"}>}PeggedQty)
but it is not working either.
In script add a field
floor(num(Date#(Report_Date,'dd.mm.yyyy'))) as DateNum; // to retrieve string date field as num values to sort from min to max
put this expression in KPI:
=sum({$<DateNum = {'$(=max(DateNum))'}>}PeggedQty)
i am attaching a qlikview file over here.but the same applies for Qlik Sense too.
Just format your date field to load script then your expression will work.
Date (Date#(Report_Date,'dd.mm.yyyy'),'dd.mm.yyyy') as Report_Date
Hello Krishna,
It summ up all dates value. It results 5600 instead of 1100
Report_Date | PeggedQty |
02.04.2018 | 500 |
06.04.2018 | 2500 |
13.04.2018 | 1500 |
19.04.2018 | 1100 |
Total | 5600 |
1100 is the max value and total is 5600.