Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi All,
I want to calculate the Sales Lost in current week compared to last week. For example;
If my sales is 0 on 2/3/2021 from 2.00pm to 4.00pm, but my sales exactly a week ago 23/2/2021 is 50 from 2.00pm to 4.00pm. So if I put this into a table I would want to generate an output as follow;
Date | From | To | Total Sales | Sales Lost |
23/2/2021 | 2.00 pm | 4.00 pm | 50 | 0 |
2/3/2021 | 2.00 pm | 4.00 pm | 0 | 50 |
Please advise how this could be achieved.
Hi,
Have you tried using the Above() and Below() functions e.g. Sales-Above(Sales)
Hi,
I have included the only two rows for the explanation purpose, where as in the actual data data set thee could be more rows than this.
Therefore, wouldn't be better to create a measure for the above requirement?
Hi,
It depends on your actual requirement. If the basis for comparison is always static, it would be more efficient to create a pre-calculated field in the data model, but it's difficult to say without a full example to work with. In general, it is good practice to post a full explanation or, even better, a qvf file so that those who might like to help can do so without having to spend time creating new app. If you can post the qvf file, I can take a further look.