Forum Discussion

barlevitzky's avatar
barlevitzky
Helper I
8 years ago

When the two lines will meet?

Hi all,

I have data looks like this

Date   Cost  Revenue

1.4.18 1000$ 200$

2.4.18 1100$ 300$

and so on.

15.7.18 0$ 800$

 

the line chart looks like this:

 

I want to calculate in how many days the integrals of the cost will meet the integral of the revenue. 

How can I do that?

Thanks

1 Reply

  • Anonymous's avatar
    Anonymous
    Not applicable

     

    You could add a table for Date or Calendar. And create a column in you data like Days from Inception where inception is the first date in you table. Just use the DATEDIFF function. Then create a calculated column which is the difference of Cost and Revenue. 

    Then create a measure like:

    *Measure = Calculate(MAX(DaysFromInception), Filter(Data Table, CostAndRevenueDiff = 0))