Forum Discussion

Tommy123's avatar
Tommy123
Frequent Visitor
1 year ago
Solved

Creating Matrix with a measure as row values with different years

So I have a mtrix I am creating bellow  and this is fine and exactly how I want it where I have the Department and the current ear selected in my calanader slicer and the previous year. My ca...
  • Tommy123's avatar
    Tommy123
    1 year ago
    ThisYearSales =
    VAR _thisyr = CONVERT(SELECTEDVALUE(PRC_00034_TEST[YEARNUM]),INTEGER)
    VAR lastyr = CONVERT(SELECTEDVALUE(PRC_00034_TEST[YEARNUM]),INTEGER)-1
    RETURN
    IF(
            min(PRC_00034_RETENTIONBASE6[YEARNUM]) = (_thisyr)||
            min(PRC_00034_RETENTIONBASE6[YEARNUM]) = (lastyr)
            ,MIN(PRC_00034_RETENTIONBASE6[ACTFACTOR_SMRR])
    )