Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
I am trying to create a line chart with two dimensions and one expression.
Dimensions are WeekStart(Date) and Type
Expression is NumberX * [Total Value]
This gives me No data to display. But writing my expression as Sum(NumberX * [Total Value]) gives the line chart. But doing a Sum gives incorrect values.
How do I use my NumberX * [Total Value] in Expression without using Sum or Count or any other aggregating measure function?
Hi @qlikwiz123
Try like below
Sum(NumberX) * Sum([Total Value])
If both fields are in same table, you can try Sum(NumberX * [Total Value]).
i would check your values.
what this generally indicates that there is more than 1 value of NumberX or/and [Total Value] for weekstart and type combination.
my educated guess is this
i think you have data like below
Date | Value |
2-Nov-2020 | 10 |
3-Nov-2020 | 20 |
4-Nov-2020 | 5 |
9-Nov-2020 | 30 |
so what happens when you have a dimension WeekStart(Date) is you get 3 values for 1-Nov-2020 (10,20,5)
this will not work.
And it will need some aggregation (sum or otherwise).
Share some sample data and example of desired output
Hi @qlikwiz123
Try like below
Sum(NumberX) * Sum([Total Value])
If both fields are in same table, you can try Sum(NumberX * [Total Value]).