Forum Discussion
Anonymous
3 years agoNot applicable
Don't count before starting date
Hello, I try to count my lost customers and my visual looks like where Lost = IF([Netamount_mon])=BLANK(),1,0) and year and month come from a date table. Since customer A first purc...
- 3 years ago
Works fine in may case: (right the table via dimDate)
Can you post your data model please?
andhiii079845
Solution Sage
3 years agoMy solution: Tabelle2
Via DAX, your old value:
Lost = IF(sum(Tabelle2[Amount])>0,0,1)
New DAX:
Lost_new =
VAR firsttime = CALCULATE(min(Tabelle2[Date]),FILTER(ALL(Tabelle2),Tabelle2[Amount]>0))
VAR currenttime = MAXX(Tabelle2,Tabelle2[Date])
VAR varnew = IF(sum(Tabelle2[Amount])= 0 && currenttime>firsttime,1,0)
RETURN varnew
Result: