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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
Vanessa250919
Helper IV
Helper IV

compare 2 years in graph stacked barr

Hello all,

 

I need to have a graph with stacked barr for compare, example JAN2021 with JAN 2022 side by side, actuly a I can compare without scrooling to JAN 2022 . It's possible ? 

 

Vanessa250919_0-1642172164221.png

 

2 REPLIES 2
v-chenwuz-msft
Community Support
Community Support

Hi @Vanessa250919 ,

 

What you mean is to have the x-axis reordered so that JAN can be compared together.
If so, then you could try this renaming the x-axes so that they can be sorted.
I did this by creating a column based on the date column, using the formula below.

Rename X = FORMAT([Date],"mm mmm yyyy")

Then sort the x axis

vchenwuzmsft_1-1642493268867.png

 

result

vchenwuzmsft_0-1642493201978.png

Or you can try small multiples, adjust the rows and columns to achieve the result you want.

vchenwuzmsft_2-1642493423834.png


Best Regards

Community Support Team _ chenwu zhu

 

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

 

 

ValtteriN
Super User
Super User

Hi,

The easiest way to do this would be to have separate measures for this year's values and last year's values.

E.g. 
LY Sales = CALCULATE([Sales],SAMEPERIODLASTYEAR('Calendar'[Date]))

After you have this measure you can place both of the measures in a chart and you get the desired end result. 

I hope this post helps to solve your issue and if it does consider accepting it as a solution and giving the post a thumbs up!






Did I answer your question? Mark my post as a solution!

Proud to be a Super User!




Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

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

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.

Top Solution Authors