Forum Discussion

burak's avatar
burak
Frequent Visitor
9 years ago
Solved

Difference between 2 columns in Matrix or Table

  I have read some solutions about this issue, but all of them was about the difference between date. I could not run any formula about my issue.   My sample data is below:   Is it possibl...
  • Greg_Deckler's avatar
    9 years ago

    Using an Enter Data query, I created a table with the following values:

    • S14
    • S15
    • S16

    Relate this table to your other table. I then created the following measures:

     

    SumUnitsTaken = SUMX(RELATEDTABLE(College),'College'[Unit Taken])
    
    S15 vs S14 = CALCULATE([SumUnitsTaken],College[Term] = "S15") - CALCULATE([SumUnitsTaken],College[Term] = "S14")
    
    S16 vs S15 = CALCULATE([SumUnitsTaken],College[Term] = "S16") - CALCULATE([SumUnitsTaken],College[Term] = "S15")

    Create a table with College, S15 vs S14 and S16 vs S15