Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Grow your Fabric skills and prepare for the DP-600 certification exam by completing the latest Microsoft Fabric challenge.

Reply
Anna422173
Regular Visitor

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 2
Anna422173
Regular Visitor

Hi @v-yilong-msft ,

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

v-yilong-msft
Community Support
Community Support

Hi @Anna422173 ,

Based on your problems, here are my answers.

I create two tables.

vyilongmsft_0-1710901504240.png

vyilongmsft_1-1710901522120.png

Then I create a new measure named CurrentYear.

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

vyilongmsft_3-1710901799111.png

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)

vyilongmsft_4-1710901927616.png

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

vyilongmsft_6-1710902084415.png
vyilongmsft_5-1710902052207.png

 

 

 

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.

Helpful resources

Announcements
RTI Forums Carousel3

New forum boards available in Real-Time Intelligence.

Ask questions in Eventhouse and KQL, Eventstream, and Reflex.

MayPowerBICarousel1

Power BI Monthly Update - May 2024

Check out the May 2024 Power BI update to learn about new features.