Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi,
I've been wrangling with this nasty little problem for the past few hours but didn't manage to solve without going back into the script.
My data basically looks like in the example. There's sales numbers for different products by calendar weeks. If I select some weeks I get beautiful average sales for all the different products. If, however, I also select a product , which doesn't have sales in every month, the time dimension collapses and I'm dividing by the wrong number of weeks.
Any suggestions?
I almost got there with variables and triggers but not quite...
Cheers
Stephan
Hello,
Assuming you are adding a count distinct/total to get the weeks you can add set analysis to ignore the product selection;
Count({<Prod=>}DISTINCT TOTAL Week)
Also attached the QVW.
Cheers,
Chris.
Hi Chris,
thanks a lot!
For some reason the expression didn't work in the table and produced different counts in different rows although it was supposed to ignore the only dimension: product. Putting the expression into a variable first, however, did the trick...
Cheers
Stephan