I'm new in DAX and I'm having some trouble calculating a value that must be similar in all the rows independently of the row. I'll explain in more detail:
I have to calculate the adoption of certain use of a program:
Sales in Program/Total Sales
(This only includes customers that have access to the program. Total sales might include sales performed by the program or not)
Some customer are not onboarded in this program and I would like to calculate the impact of onboarding this customer into the program:
# of Sales in Program/# of Total Sales - # of Sales in Program/(# of Total Sales + # of Customer sales)
The # of customer sales is of course outside the program. The adoption calculation (# of Sales in Program/# of Total Sales) must be the same for all customers, the only data that changes according to the row is # of Customer sales. My data is transactional and is like this:
Customer Order Date Onboarded Program
01 001 01-01-2018 Yes In Program
01 002 01-01-2018 Yes Not In Program
03 003 01-01-2018 No In Program
So far, I have:
Adoption = CALCULATE( COUNT(Adoption[Order]),
FILTER(Adoption, Adoption[Program] = "In Program" &&
Adoption[Onboarded] = "Yes")
/
CALCULATE( COUNT(Adoption[Order])
FILTER(Adoption, Adoption[Onboarded] = "Yes"))
I tried to use All
but still it was affected by the rows. How can I make it so that the adoption is the same for all the rows?
So far, my output is something like this (note: right now I'm just calculating the first part of the equation):
Customer Adoption
01 0.5
02 0.2
03 0.7
However, it should be the same for all:
Customer Adoption
01 0.4
02 0.4
03 0.4
Thanks in advance