Forum Discussion

gorgina's avatar
gorgina
Frequent Visitor
3 years ago
Solved

DYNAMIC MEASURE ACCORDING TO YEARS

HELLO BRO

I HAVE
 

 

AND I NEED TO USE MANY MEASURES AS KPI  LIKE PROFIT , SALES INVIOCES NUMBER,......

AND UNDER EACH KPI I NEED TO CALCULATE GROWTH IN REALTION TO A SPECIFIC YEARS 

WHICH CHANGED DYNAMICALLY ACCORDING TO DATE FILTER YEAR MONTH

 

EX

ANY BODY CAN HELP

  • Anonymous's avatar
    Anonymous
    3 years ago

    Hi gorgina ,

     

    I suggest you to create a Calendar table to help you compare the select period and last year same period data. 

    Calendar = ADDCOLUMNS(CALENDARAUTO() ,"Year",YEAR([Date]),"Month",FORMAT([Date],"MMM"),"MonthSort",MONTH([Date]))

    Measure:

    Net Profit diff = CALCULATE(SUM('Table'[NET PROFIT])) - CALCULATE(SUM('Table'[NET PROFIT]),SAMEPERIODLASTYEAR('Calendar'[Date]))

    Result is as below.

     

    Best Regards,
    Rico Zhou

     

    If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

     

     

1 Reply

  • Anonymous's avatar
    Anonymous
    Not applicable

    Hi gorgina ,

     

    I suggest you to create a Calendar table to help you compare the select period and last year same period data. 

    Calendar = ADDCOLUMNS(CALENDARAUTO() ,"Year",YEAR([Date]),"Month",FORMAT([Date],"MMM"),"MonthSort",MONTH([Date]))

    Measure:

    Net Profit diff = CALCULATE(SUM('Table'[NET PROFIT])) - CALCULATE(SUM('Table'[NET PROFIT]),SAMEPERIODLASTYEAR('Calendar'[Date]))

    Result is as below.

     

    Best Regards,
    Rico Zhou

     

    If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.