Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
7 years ago
Solved

Calculation Difference Between Two Numbers in Two Tables Only

I am trying to compare the price of two different products across time, but on some dates I might not have price date for both products, so I want to exclude dates.  As you can see on the bottom of t...
  • mwegener's avatar
    7 years ago

    Hi,

     

    with a if statement you can check if both prices exists.

     

    GAP = IF( ISBLANK('Daily Price 1'[$]) || ISBLANK(RELATED('Daily Price 2'[$])), BLANK(), 'Daily Price 1'[$]-RELATED('Daily Price 2'[$]) )

     

    The BLANK() GAP can be filtered on the visual level