Forum Discussion

Fanis_Georg's avatar
Fanis_Georg
Regular Visitor
1 year ago
Solved

Dynamic comparison of values

Hello team   I have a table that i have the costs of the materials for the full year broken down by month. Each month that I am running the results i add it in the same excel right under the previo...
  • Greg_Deckler's avatar
    1 year ago

    Fanis_Georg So perhaps something like this:

    Current vs. Standard = 
      VAR __Material = MAX( 'Table'[Material] )
      VAR __TableCurrent = FILTER( ALL( 'Table' ), [ResultPeriod] = "Current" )
      VAR __TableSTD = FILTER( ALL( 'Table' ), [ResultPeriod] = "STD" )
      VAR __Current = SUMX( __TableCurrent, [Costing] )
      VAR __STD = SUMX( __TableSTD, [Costing] )
      VAR __Result = __Current - __STD
    RETURN
      __Result