Forum Discussion

manojk_pbi's avatar
manojk_pbi
Icon for Helper V rankHelper V
2 years ago
Solved

Need help to write DAX or measure

Hi Friends,   I am working on some data to represent the trends of % Change in Bugs. The change is always calculated for the current month & baseline will Janunary (opening counts). The baseline ca...
  • Anonymous's avatar
    Anonymous
    2 years ago

    HI manojk_pbi,

    You can try to use the following measure formula if it suitable for your requirement:

    % Change formula =
    VAR baseData = 'formula that calculate the baseline data'
    VAR currData =
        CALCULATE (
            SUM ( Table1[Bugs] ),
            ALLSELECTED ( Table1 ),
            VALUES ( Table1[MonthYear] ),
            VALUES ( Table1[Product] )
        )
    RETURN
        DIVIDE ( baseData - currData, baseData, -1 )

    Notice: replace the baseData variable part with your calculation to get the initzation data to calculate.

    Regards,

    Xiaoxin Sheng