Forum Discussion

deepakv's avatar
deepakv
Frequent Visitor
3 years ago
Solved

Based on 2 measures can the calculation work or return null?

Hi Community, With the below table  If any of the measure (Cost) and measure(Prior quarter values) contains nulls the Variance column should not perform the calculation, If both the measures contai...
  • amitchandak's avatar
    3 years ago

    deepakv ,

    variance = if(not(isblank([COst])) && not(isblank([prior quarter values]))  , [prior quarter values] -[Cost], blank())

     

    or

     

    variance =Sumx(values(Table[Product]), calculate(  if(not(isblank([COst])) && not(isblank([prior quarter values]))  , [prior quarter values] -[Cost], blank()))