Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi everyone 🙂
I have data about shops from different cities and about invoices. Products in those shops have 7-digits codes. Invoices for those products can by invoiced in two ways (directly or blurred) depending on the 7-digits code. So it looks like this:
nrSklep is the number of the particular shop
I've marked rows to show that it can be more clear --> for a products with the same "code 7", the shop has direct and indirect invoices.
I want to have a column with a percentage of these two types of invoices for each code7, for each shop, for each month/year.
If I won't add "invoiced by" and add a measure sum(invoice value), I get the overall value:
I tried something like this:
=((Aggr(distinct sum(invoice value), year, month, nrSklep, code7, invoiced by))
/
(Aggr(nodistinct sum(invoice value), year, month, nrSklep, code7)))*100
and it works:
BUT: when i filter "direct" i want it to show me only direct invoices values and % they are but it change to this:
% is 100 for everything
How can i filter by direct/indirect and still get the correct % ?
Try
((Aggr(distinct sum(invoice value), year, month, nrSklep, code7, invoiced by))
/
(Aggr(nodistinct sum({$<invoiced by=>} invoice value), year, month, nrSklep, code7)))*100
Try
((Aggr(distinct sum(invoice value), year, month, nrSklep, code7, invoiced by))
/
(Aggr(nodistinct sum({$<invoiced by=>} invoice value), year, month, nrSklep, code7)))*100