Forum Discussion
Calculate measure two different tables
- 6 years ago
your statement
calculate(sum(Transacties[AmountDC]);ALL('DimRelaties');'DimRelaties'[CanDropShip]=true())looks pretty good to calculate total revenue by ALL customers which candropship is true
isn't it work ok? give a data example please
do not hesitate to give a kudo to useful posts and mark solutions as solution
Hi lekkerbek
as i see your data model to calculate dropshipment customers you need something like that
calculate(countrows('Customers');ALL('Customers');'Customers'[candropship]=true())if you need a count of transactions which made by dropshipment customers you need something like that
calculate(countrows('Transactions');ALL('Customers');'Customers'[candropship]=true())and dont forget to createrelationships beween these tables
what is the table DimRelaties?
do not hesitate to give a kudo to useful posts and mark solutions as solution
- lekkerbek6 years agoHelper IV
Hi az38,
Thank you for your suggestion. What I need is the total revenue of the dropshipment customers.
I tried to rewrite your code to, but I think this gives me the number of transactions rather than the revenue: calculate(sum(Transacties[AmountDC]);ALL('DimRelaties');'DimRelaties'[CanDropShip]=true())
Basically "transacties = transactions table" and "DimRelaties = customers table"
I forgot to translate that into English.
- az386 years agoCommunity Champion
your statement
calculate(sum(Transacties[AmountDC]);ALL('DimRelaties');'DimRelaties'[CanDropShip]=true())looks pretty good to calculate total revenue by ALL customers which candropship is true
isn't it work ok? give a data example please
do not hesitate to give a kudo to useful posts and mark solutions as solution
- v-lid-msft6 years agoCommunity Support
Hi lekkerbek ,
Based on my test, your formula works fine with our sample data, could you please figure the difference in data model between ours and yours?
Best regards,- lekkerbek6 years agoHelper IV
Thank you both. I will look into this in more detail as there seems to be something wrong with my model. The loopupvalue function also gives no results.
At least now I know the formula is correct. Thanks.