Forum Discussion

ab_99's avatar
ab_99
Frequent Visitor
2 years ago
Solved

Divide one value by reference value in a matrix (trend calculation)

Hi dear Power BI Community,   I have this following issue:  I have a matrix with years in rows and months in columns. Now I want to perform a trend calculation as follows: Value from 2023-...
  • Selva-Salimi's avatar
    Selva-Salimi
    2 years ago

    would you try this solution:

    var min_date= calculate(min(date), allselected(table))

    var ref = CALCULATE(max(X), filter(ALLSELECTED(table), [date] = min_date)

    return

    divide ( selectedvalue( X) , ref)

     ** X is the column that contain tehse values **

     

    if still not working, please provide some details about your tables, model and relationships.