Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
4 years ago
Solved

Report building (DAX)

Hi all,   I have two tables in the data field. Both are similar. But I need to make a note if anything changed. For eg: I have my two tables which are Table1 and Table2.   Table1 Partno co...
  • sevenhills's avatar
    4 years ago

    Two measures:

    Changed = 
    
    var _SelP = SELECTEDVALUE(Table1[Partno])
    var _SelCode = SELECTEDVALUE(Table1[code])
    var _selCodeInT2 = LOOKUPVALUE(Table2[code], Table2[Partno], _SelP) 
    
    return if ( HASONEVALUE(Table1[Partno])  , if ( _SelCode = _selCodeInT2 , "Same Value", "Value Changed"), blank())
    

     

    Count Changed = Coalesce(CALCULATE( count(Table1[Partno]), FILTER(Table1, [Changed] = "Value Changed")), 0)

    Note: I did as two measures, you can club as one too

     

     Results as: