cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
coreyweiss Member
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  
DateCat AmountCat Cost
6/30/2018432
7/1/2018434
7/2/2018444
7/3/2018322
7/4/2018635
7/5/2018221
7/6/2018445

 

Table Cat Override  
DateCat AmountCat Cost
7/3/2018113
7/4/2018222
7/5/2018333
7/6/2018466

 

1 ACCEPTED SOLUTION

Accepted Solutions
Community Support Team
Community Support Team

Re: If Row Blank Use Other Value

Hi @coreyweiss

 

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.
1 REPLY 1
Community Support Team
Community Support Team

Re: If Row Blank Use Other Value

Hi @coreyweiss

 

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.