Forum Discussion

Chase234's avatar
Chase234
Frequent Visitor
3 years ago
Solved

Measure for percentage change using date fields

Hi,

Super new to Power BI but I have a table for capturing when an objective was created with a date/time column called 'createdOn'

I want to calculate how many have been created per month so I have a measure for 'Total Objectives' as: 
COUNTA('reviews Objective'[CreatedOn])

Which when put on a table I can get the following:



What I would now like to do is to add another column with the percentage change from the previous month.
I have looked and googled and all queries seem to be 'Sums' rather than 'Counts' and I'm wondering if what I am trying to do is possible.

TIA

 

 

  • Anonymous's avatar
    Anonymous
    3 years ago

    Hi Chase234 ,

     

    Please try like:

    the percentage change = 
    VAR _pre = CALCULATE([Total Objectives],PREVIOUSMONTH('Calendar'[Date]))
    VAR _change = DIVIDE([Total Objectives]-_pre,_pre)
    RETURN
    _change

    Best Regards,
    Gao

    Community Support Team

     

    If there is any post helps, then please consider Accept it as the solution  to help the other members find it more quickly. If I misunderstand your needs or you still have problems on it, please feel free to let us know. Thanks a lot!

    How to get your questions answered quickly --  How to provide sample data in the Power BI Forum

4 Replies