Forum Discussion
cvinas
8 years agoFrequent Visitor
Relationship problem
Hi all, I have the following scenario: I am counting the number of interactions from a sender to a destination and viceversa (depending on sender type: ...
- 8 years ago
Hi cvinas,
If I understand you correctly, the formula below should work in your scenario. :smileyhappy:
# Started by Circle = VAR currentSelectIDOrigin = MAX ( ActivityxUser[ID Origin] ) RETURN IF ( COUNTROWS ( ALLSELECTED ( ActivityxUser[ID Origin] ) ) = COUNTROWS ( ALL ( ActivityxUser[ID Origin] ) ), CALCULATE ( COUNT ( 'ActivityxUser'[Transaction] ), 'ActivityxUser'[Sender] = "CERCLE" ), CALCULATE ( COUNT ( ActivityxUser[Transaction] ), FILTER ( ALLEXCEPT ( ActivityxUser, ActivityxUser[Date] ), ActivityxUser[ID Destination] = currentSelectIDOrigin && ActivityxUser[Sender] = "CERCLE" ) ) )Regards
v-ljerr-msft
8 years agoMicrosoft Employee
Hi cvinas,
If I understand you correctly, the formula below should work in your scenario. :smileyhappy:
# Started by Circle =
VAR currentSelectIDOrigin =
MAX ( ActivityxUser[ID Origin] )
RETURN
IF (
COUNTROWS ( ALLSELECTED ( ActivityxUser[ID Origin] ) )
= COUNTROWS ( ALL ( ActivityxUser[ID Origin] ) ),
CALCULATE (
COUNT ( 'ActivityxUser'[Transaction] ),
'ActivityxUser'[Sender] = "CERCLE"
),
CALCULATE (
COUNT ( ActivityxUser[Transaction] ),
FILTER (
ALLEXCEPT ( ActivityxUser, ActivityxUser[Date] ),
ActivityxUser[ID Destination] = currentSelectIDOrigin
&& ActivityxUser[Sender] = "CERCLE"
)
)
)
Regards
cvinas
8 years agoFrequent Visitor