I want to make a grid chart, based on a calculated dimension.
I have a list of persons :
[CODE]
Person: LOAD * INLINE [ Age, Sexe, Nom 18, F, Sabrina 18, M, Kevin 19, M, Simon 21, F, Vanessa 21, F, Muriele 21, F, Samantha 21, M, Mickael 30, M, Bob1 30, M, Bob2 30, M, Bob3 30, M, Bob4 30, M, Bob5 30, M, Bob6 30, M, Bob7 30, M, Bob8 ];
[/CODE]
I want to make a chart having in x-axis the age, and in the y-axis the count of person having this age.
My problem is that I don't know how to display the other values in the scale.
At first, my chart looked like this :
Having the same space between "18" and "19" than between "21" and "30".
I managed to display all the ages with this code :
TmpTable: LOAD max(Age) AS tmp_max, min(Age) AS tmp_min RESIDENT Person; LET maxAge = peek('tmp_max', 0, 'TmpTable'); LET minAge = peek('tmp_min', 0, 'TmpTable'); DROP TABLE TmpTable;
LstAges: LOAD $(minAge) + RowNo() - 1 AS Age AUTOGENERATE 1 WHILE IterNo() <= $(maxAge) - $(minAge);
That gave me the following chart :
I don't want to use the same trick for the count of ages, because it's in my real project a very complex set analysis formula I cannot compute in the loading script.
How can I say to the graph "display all values (1 to 😎 in the y-axis" ?