Forum Discussion

Anna422173's avatar
Anna422173
Regular Visitor
2 years ago

Measures in rows previos year

Hello,

 

I created a visualization which has 16 Measures (for a calculated income statement in Power BI). I wanted them in the rows, so I activated the option "switch values in rows rather in columns".

Now I would like to have the data from the previous year in the second column.

 

I know, that I need new measures for the previous year comparison but now I have all Measures in rows.

 

How can I add the previos year ( and difference/ diff. %) in the columns?

2 Replies

  • Anonymous's avatar
    Anonymous
    Not applicable

    Hi Anna422173 ,

    Based on your problems, here are my answers.

    I create two tables.

    Then I create a new measure named CurrentYear.

    CurrentYear = SUM('Table'[Part1]) + SUM('Table'[Part2])

    I also create three measures.

    PreviousYear = CALCULATE(SUM('Table'[Part1]),DATEADD('Calendar'[Date],-1,YEAR))
    Difference = 'Table'[CurrentYear] - 'Table'[PreviousYear]
    Percentage Difference = DIVIDE('Table'[Difference],'Table'[PreviousYear],0)

    I think you can use Matrix to show what you want.


     

     

     

    Best Regards

    Yilong Zhou

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

  • Anna422173's avatar
    Anna422173
    Regular Visitor

    Hi Anonymous ,

    yes, this step I already made. 

    But I have measures for revenue, costs, profit, profit % in my rows. 

    Now I would like to have the same measures for the previous year in the columns next to my AC measures.

    How can I solve this?

     

    Greetings,

    Anna