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

Announcements
Join us in Bucharest on Sept 18th for Qlik's AI Reality Tour! Register Now
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Problem with dimension

hello everybody who read this,

i m actually stuck with Qlikview.

i have a table in SQL server wich can be represented like this :

ID = a basic autoincrement id.

Date  = date when contribution is done

Contribution = a Code who refer to a contribution (ex : 1 = Creation, 100=In process, 19=send to validation, 20 = Validation Problem, 15 = finish).

CodeDocument = a key who refer to Document table.

We have created a calender from the date (wich is used to filter in qlikview).

Exemple with 1 document :

Document_tmp:

load * inline [

id,date,contribution,codedocument,

001,01/01/2016 10:50:00,1,105

200,05/01/2016 15:32:00,100,105

259,09/01/2016 12:00:00,19,105

421,19/01/2016 07:10:59,20,105

517,20/01/2016 10:50:00,19,105

639,01/01/2016 10:50:00,15,105

];



We are trying to do a graphic wich show the last state know on an interval.


By example : we wanna know wich contribution was the last between thde 01/01/2016 and the 09/01/2016.

I used a simple table with this :

Dimennsion =aggr(MaxString({<Day={"<=$(=max(Day))"},ID={"=$(=max(ID))"}>}Contribution),CodeDocument)

//Day come from our calendar.

Expression =  Count({<Day={"<=$(=max(Day))"},ID={"=$(=max(ID))"}>}CodeDocument)

Our problem is, on the dimension the maxstring({set analysis}Contribution} answer the 100 (in the exemple over) instead of 19.

Thank you for your help !!

1 Reply
swuehl
MVP
MVP

Not exactely sure what you need here,but maybe try

=aggr( FirstSortedValue({<Day={"<=$(=max(Day))"} >} Contribution, -ID ) ,CodeDocument)