cancel
Showing results for
Did you mean:
Highlighted
Member

## If Row Blank Use Other Value

Hi there!

I have 2 tables of cats. I would like to create a sum of cat amounts. The caveat is that when there is a value in the override table for a date, that value is summed instead of the value in the cats table.

Ie  total cats amount = (4+4+4)+(1+2+3+4) = 22

 Table Cats Date Cat Amount Cat Cost 6/30/2018 4 32 7/1/2018 4 34 7/2/2018 4 44 7/3/2018 3 22 7/4/2018 6 35 7/5/2018 2 21 7/6/2018 4 45

 Table Cat Override Date Cat Amount Cat Cost 7/3/2018 1 13 7/4/2018 2 22 7/5/2018 3 33 7/6/2018 4 66

1 ACCEPTED SOLUTION

Accepted Solutions
Community Support Team

## Re: If Row Blank Use Other Value

You may try to create a measure as below:

`Measure =SUMX (    'Cats',    IF (        RELATED ( 'Cat Override'[Date] ) <> BLANK (),        RELATED ( 'Cat Override'[Cat Amount] ),        Cats[Cat Amount]    ))`

Regards,

Cherie

Community Support Team _ Cherie Chen
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Community Support Team

## Re: If Row Blank Use Other Value

You may try to create a measure as below:

`Measure =SUMX (    'Cats',    IF (        RELATED ( 'Cat Override'[Date] ) <> BLANK (),        RELATED ( 'Cat Override'[Cat Amount] ),        Cats[Cat Amount]    ))`

Regards,

Cherie

Community Support Team _ Cherie Chen
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.