Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi,
I am trying to figure something out.
i have a sales case in which i sell cars. i have VW, BMW and Audi's.
every week i get a report on the sales from this week. i can see which cars are selling the best each week.
i can also see the contribution of each car in %
for example
week 20
Brand | Amount | Contribution |
---|---|---|
Audi | 12 | 18% |
BMW | 20 | 30% |
VW | 35 | 52% |
Total | 67 | 100% |
The above table is easy to replicate in QV.
But now i want to see all weeks in the same table but i want to see the contribution of a Brand for each week and not the contribution on the year total.
Week | Brand | Amount | Contribution |
---|---|---|---|
20 | Audi | 12 | 18% |
20 | BMW | 20 | 30% |
20 | VW | 35 | 52% |
21 | Audi | 20 | 20% |
21 | BMW | 35 | 35% |
21 | VW | 45 | 45% |
is it possible to create it like that?
try in the table and show in percentage:
contribution: sum(Amount)/sum(total <Week> Amount)
You need to create Week-field, ideally by using the following expression: week('Date') as Week.
I have a master calendar which contains a week-field. that is not my question.
I want to know if it is possible to replicate my table above.
The % is calculated in the table and not a value in my datasource
try in the table and show in percentage:
contribution: sum(Amount)/sum(total <Week> Amount)
Nard
You'll need to use the total qualifier in your expression. The Chart Aggregation functions section of the Help describes it at length.
Hi:
This is possible using your week as a calculated dimension.
How about something like this:
avg(aggr(nodistinct sum(Amount)/sum(Total <Week> Amount),Week,Brand))
Hi,
you can create a straight table with week (or weekyear) and brand as dimensions. Also you can have the same amount expression as in your example. What will change is that your expression for the weekly contribution per brand has to be something like this:
sum(Amount) / sum(total <week> Amount)
of course, you may add any additional filter (with set analysis or direct selections) so you can get to the result you need,
hope this helps,
regards
Hi,
one example:
hope this helps
regards
Marco
Yes this works perfect, thank you