Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi,
I got a question if I could make the following in Qlikview:
The table with data looks like
Model | price per unit | quantity | date |
---|---|---|---|
model 1 | 200 | 2 | 14-01-2012 |
model 1 | 220 | 1 | 18-01-2012 |
model 2 | 555 | 5 | 05-02-2012 |
model 3 | 852 | 1 | 08-02-2012 |
model 1 | 190 | 4 | 09-02-2012 |
In the real situation ,there are more rows - captain obvious
Because every unit is custom, each has a diffrent price.
The price for a model is the average.
I guess this is all the information you need, if not tell me.
Kind regards,
ThijsJan
ps. I didn't know how to call the titel, but if you have a better solution please say it so I can change it.
Hi ThijsJan,
I don't quite follow the data example with the graph example, but if you are wanting the bars to move up and down the axis based on value, then the trick is to create the axis value as a dimension in the load script, eg ...
Data:
LOAD * INLINE [
Model, price per unit, quantity, date
model 1, 200, 2, 14-01-2012
model 1, 220, 1, 18-01-2012
model 2, 555, 5, 05-02-2012
model 3, 852, 1, 08-02-2012
model 1, 190, 4, 09-02-2012];
XDim:
LOAD
Model,
sum([price per unit] * quantity) as ModelTotalValue
resident Data group by Model;
Then when you create your bar-chart, use the new field (ModelTotalValue in my code) as the dimension, and include Model as one of the expressions but just set as Values on Data Points (no bar). Under the Axes tab, tick Continuous for the Dimension Axis.
flipside
Thanks for the reply's, I will try it out now.
But if I group by load, is it then still possible to filter by date?
Yes, you are.
If you delete in my script row "DROP TABLE Model1;" and add List-object with expression [date]
BR