Hi. looknig for them ost efficient way to do the following. I have users carrying out spending transactions and want to know the average no of spends per user in different catagories e.g. male/female. I can think of 2 ways:
2. Create a pivottable measure AvSpendcount=CALCULATE(counta(users[transactions]),filter(transactions,transaction[transaction]="spend"))/
CALCULATE(DISTINCTCOUNT(Users[UserID]),filter(transactions,transaction[transaction]="spend"))
2nd one has the advantage of not creating yet another column of data in my model but means I can't just reuse Spendcount in other calculations. Is there any other smart way tod this sort of thing as doing it a lot i.e. user aveage of some calculation?
Thanks
Mike
- In powerpivot window on the user table do SpendCount=CALCULATE(counta(users[transactions]),filter(transactions,transaction[transaction]="spend"))
2. Create a pivottable measure AvSpendcount=CALCULATE(counta(users[transactions]),filter(transactions,transaction[transaction]="spend"))/
CALCULATE(DISTINCTCOUNT(Users[UserID]),filter(transactions,transaction[transaction]="spend"))
2nd one has the advantage of not creating yet another column of data in my model but means I can't just reuse Spendcount in other calculations. Is there any other smart way tod this sort of thing as doing it a lot i.e. user aveage of some calculation?
Thanks
Mike