Forum Discussion
Anonymous
5 years agoNot applicable
Looking back and in the future in DAX code
Hey all, this is a copy of a previous post I made. I already accepted it as the solution, but sadly I later realised I needed to add in more logic to the DAX. Original Post: (Firstly, a sample o...
- 5 years ago
Hi Anonymous ,
Belive that this can be done by making the following:
Relevance = VAR _1 = COUNTX ( FILTER ( Projects, Projects[CustomerID] = Activities[CustomerID] && Activities[ActivityDate] >= Project[ProjectDateCreated] - 7 && Activities[ActivityDate] <= Project[ProjectDateCreated] + 30 ), Projects[CustomerID] ) RETURN IF ( ISBLANK ( _1 ), 0, 1 )
MFelix
Super User
5 years agoHi Anonymous ,
Belive that this can be done by making the following:
Relevance =
VAR _1 =
COUNTX (
FILTER (
Projects,
Projects[CustomerID] = Activities[CustomerID]
&& Activities[ActivityDate] >= Project[ProjectDateCreated] - 7
&& Activities[ActivityDate] <= Project[ProjectDateCreated] + 30
),
Projects[CustomerID]
)
RETURN
IF ( ISBLANK ( _1 ), 0, 1 )