
1. Re: Calculating accuracy (%) using the count of multiple dimensions
Paul Wachtler Dec 2, 2018 10:42 AM (in response to marian.eerens)Hi Marian,
Here's the calculation you're looking for:
(COUNTD([Order Id])  COUNTD(if [Type] = "Return" and [Reason] = "5" then [Order Id] end))
/
COUNTD([Order Id])
I've updated the attached workbook with this. Let me know if you have any questions.
Best,
Paul

accuracy_v10.5.twbx 19.5 KB


2. Re: Calculating accuracy (%) using the count of multiple dimensions
Jim Dehner Dec 2, 2018 10:44 AM (in response to marian.eerens)Good afternoon
please see the attached
I broke the calcs into pieces but they could all be combined
first the order count (by day (I assumed you would want that)
returns type 5
and the Accuracy %
it returns this by day
or this in summary
Jim
If this posts assists in resolving the question, please mark it helpful or as the 'correct answer' if it resolves the question. This will help other users find the same answer/resolution. Thank you.

accuracy_v10.2.twbx 47.5 KB


3. Re: Calculating accuracy (%) using the count of multiple dimensions
marian.eerens Dec 3, 2018 1:56 PM (in response to Jim Dehner)Jim Dehner Paul Wachtler Thanks for the input!!
Looks like both approaches are similar  didn't know you could nest an IF statement in COUNTD so that really solved it. I tested it with the datasource from work and the numbers add up,
For some reason the formula in the sampler from Paul (which I had the tweak a bit) didn't add up and can't see why  would you mind taking another look because I would like to understand what I'm missing.
This is what I made of it
(COUNTD (if [Type]="Order" then[Order Id] END)  COUNTD(if [Type] = "Return" and [Reason] = "5" then [Order Id] end))
/
COUNTD([Order Id])
I have to be able to add the Date Dimension and if I do the calculations manually: I would expect the % of January to show as (113)/11 = 72,72% yet according to attached workbook it says 40%.
Attached the solution from work, after pulling some samples the numbers add up there. The data I'm working with in real life is a bit more complex, wish the calculations could be simpler (perhaps I' missing something) but it works.

accuracy 10.5  edit ME.twbx 25.1 KB

Work Calcs.docx 13.0 KB


4. Re: Calculating accuracy (%) using the count of multiple dimensions
Paul Wachtler Dec 3, 2018 2:11 PM (in response to marian.eerens)Hi Marian,
Apologies, realized my mistake. I didn't filter the bottom for the "Order" type so it's using all of the order numbers in the denominator, regardless of type. Try this instead:
(COUNTD (if [Type]="Order" then[Order Id] END)  COUNTD(if [Type] = "Return" and [Reason] = "5" then [Order Id] end))
/
(COUNTD (if [Type]="Order" then[Order Id] END)
Best,
Paul

6. Re: Calculating accuracy (%) using the count of multiple dimensions
marian.eerens Dec 5, 2018 1:36 AM (in response to marian.eerens)Closing this because the I was able to leverage the info and create a solution for work (details in attachment).
The help has helped

Work Calcs.docx 13.0 KB
