How to lock the aggregation level in a result

32 views Asked by At

I’m having a problem trying to lock the aggregation level in a result.

I have a report showing : store, articule, sales, and stock. I need that the sales metric doesn’t change despite the store.

For example: if one articule had 3 sales in one store and 2 sales in the other one, the report should show 5 sales no matter what store I am looking for.

Do you have any suggestions?

1

There are 1 answers

0
Jona Azizaj On

You have to create a custom metric and use the BY ALL statement.

If the metric returning 3 and 2 looks like SELECT SUM(Sales), the metric returning 5 would be SELECT SUM(Sales) BY ALL Store.