Forum Discussion
jussiwaisto
6 years agoHelper I
Hitrate from two dates problem
Hi, I have a table (offers to customers) where are two date datas and if i want to count a hitrate from one month (deals made in that month / offers made in that month) I should made a count from...
jussiwaisto
6 years agoHelper I
Ok. let's take it again:
The situation was this. Every offer hav the offer date and deals have also deal confirmation date. If there is no deal, the confirmation date is empty.
So I have 1 confirmed deal in february and 5 offers made in february.
| Customer | Offer date | Deal confirmation date |
| Cust1 | 1.1.2019 | |
| Cust2 | 2.1.2019 | |
| Cust3 | 3.1.2019 | |
| Cust4 | 4.1.2019 | 6.2.2019 |
| Cust5 | 5.1.2019 | |
| Cust6 | 1.2.2019 | |
| Cust7 | 2.2.2019 | |
| Cust8 | 3.2.2019 | |
| Cust9 | 4.2.2019 | |
| Cust10 | 5.2.2019 | |
| Hitrate in february = 1 / 5 = 0,2 = 20% (cust4 / cust6+7+8+9+10) |
amitchandak
6 years agoSuper User
Try something like this
IDs = (
VAR _Cuur_start = MIN('Date'[Date])
VAR _Curr_END = Max('Date'[ Date])
return
calculate(countdistinct(Sales[ID]), not(isblank(Confirmation)) && Sales[Confirmation Date] >= _Cuur_start && Sales[Confirmation Date] <= _Curr_END
,CrossFilter(Sales[offer Date],'Date'[Date] ) //in case you do not want to follow offer data
))- jussiwaisto6 years agoHelper I
Thanks, lets try!
Something went wrong in the syntax. (?) Did i wrote it right?