Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hello Qlik Community,
is there a way to load only the maximum (latest) date per dimension?
So, I have the following Table (example) with different Production lines, the Article number, the Status and the Date of the Status. I only want to load the maximum Date per production line:
So in the example only the green marked Data:
Thanks!
Regards,
Johannes
As below
Main:
load
ProductionLine,ArticleNumber,Status,Date
From SomeSource;
Inner Join(Main)
Load ProductionLine,Max(Date) as Date
Resident Main
Group by ProductionLine;
For the date column, use this expression.
Aggr(FirstSortedValue(Date(Date),-Date),[Production Line])
As below
Main:
load
ProductionLine,ArticleNumber,Status,Date
From SomeSource;
Inner Join(Main)
Load ProductionLine,Max(Date) as Date
Resident Main
Group by ProductionLine;
Hello,
is it also possible to only do it in the chart diagram, not in the script?
Thanks!
I have very similar issue, I am interested too how to do this on diagram (by measure/dimession)
You can restrict data using a calculated dimension
=Aggr(If(Datefield=max(Datefield),Datefield), ProductionLine)
Uncheck show null values for this dimension
Or
by adding the same condition to the measures instead; as below
=Sum(Aggr(If(Datefield=max(Datefield),SomeMeasureField), ProductionLine) )