Forum Discussion

MichaelG_NAC's avatar
MichaelG_NAC
Frequent Visitor
3 years ago
Solved

Comparing value between years based on another column

Hello  I am looking to compare Values between diffrent years  Year Unique Value 1 A 5 1 B 10 2 A 15 3 C 16 2 B 20 so at the end im looking to have a subt...
  • DOLEARY85's avatar
    3 years ago

    Hi,

     

    try this:

     

    Measure 4 = var _max = CALCULATE(max('Table (3)'[Value]),ALLEXCEPT('Table (3)','Table (3)'[Unique]))

    var _min = CALCULATE(min('Table (3)'[Value]),ALLEXCEPT('Table (3)','Table (3)'[Unique]))

    return

     if(COUNT('Table (3)'[Unique])=1,_max,_max - _min)
     

     

    If I answered your question, please mark my post as solution, Appreciate your Kudos ๐Ÿ‘