Forum Discussion

cdoblare28's avatar
cdoblare28
Frequent Visitor
3 years ago

Differentials Calculation

Hello,

 

I am currently finding trouble with the calculation of Differentials (Value of Today - Previous Value). Find here a screenshot of the table used:

 

 

 

I have several Indexes and the calculation is based on Date. The problem is that depending on the index there are prices published on weekends, and some others don´t, so what I want to calculate is if there are days (for example weekends) that there are no price published, to return the difference against the latest value published, for example, price of Monday vs Price of Friday. I want to return the absolute value and the percentage.

 

Many thanks!

 

 

 

 

2 Replies

  • cdoblare28 , Based on what I got.

     

    Create a date table.

     

    Then join it with date of your table and then create a measures like

     

    M1 = countrows(Table)

     

    m2= Countx( Date, if(isblank([M1]), [Date], blank() ) 

     

    use M2 with date from date table

    • cdoblare28's avatar
      cdoblare28
      Frequent Visitor

      amitchandak appreciate your response, but I think that does not solve the problem. The output of that table is a lines chart, so if I generate artificially dates, that chart is not going to be good because it will consider dates without quotations flat respect the latest value. I think that what I need is just a measure.