Forum Discussion
Victor_AguirreV
2 years agoRegular Visitor
Issues with Relationships and Calculate function
Hello guys! I have the following DataModel: And what I am trying to do is get the total number of chargebacks, calculated by counting the primary key in All_CBs table called "Journal...
- 2 years ago
Hello Guys,
I solved it. My apologies if someone was trying to figure this out. This was the solution:
Total CBs by CB Date = CALCULATE([Total CBs],USERELATIONSHIP('Calendar'[Date], All_CBs[Date Chargeback]))Total CC Deposits by Date = CALCULATE([Total CC Deposits],USERELATIONSHIP(All_dep_bd[Short.Date],'Calendar'[Date]))CB Rate = DIVIDE([Total CBs by CB Date], [Total CC Deposits by Date])
Victor_AguirreV
2 years agoRegular Visitor
Hello Guys,
I solved it. My apologies if someone was trying to figure this out. This was the solution:
Total CBs by CB Date = CALCULATE([Total CBs],
USERELATIONSHIP('Calendar'[Date], All_CBs[Date Chargeback])
)
Total CC Deposits by Date = CALCULATE([Total CC Deposits],USERELATIONSHIP(All_dep_bd[Short.Date],'Calendar'[Date]))
CB Rate = DIVIDE([Total CBs by CB Date], [Total CC Deposits by Date])