Forum Discussion

micmat's avatar
micmat
Regular Visitor
6 years ago
Solved

Ignore Value if no date

Date Location Product Value 11/25/2019 US A 20 11/25/2019 US B 30 11/26/2019 US A 50 11/27/2019 US A 30 11/27/2019 US B 60   Hey all, so what I would like to ...
  • parry2k's avatar
    parry2k
    6 years ago

    micmat I did with following measures

     

    Total Value = SUM ( 'Table (2)'[Value] )
    
    Product A Value = CALCULATE ( [Total Value], 'Table (2)'[Product] = "A" )
    
    Product B Value = CALCULATE ( [Total Value], 'Table (2)'[Product] = "B" )
    
    Product B - Product A = 
    IF ( [Product A Value] = BLANK() || [Product B Value] == BLANK(), BLANK(), [Product B Value] - [Product A Value]
    )

     

    Use bar chat, drop date on X-Axis and Product B - Product A on value section