cancel
Showing results for
Did you mean:

Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and more. Get started

Frequent Visitor

## Performance in area chart showing year over year comparisons

I am trying to show how each year has compared to prior years.  Right now we only have 1.5 years worth of data.  I have noticed that the area chart is not accurately showing 2022 data.  The purple section is showing the sum of 2021 and 2022.  You can see below that the June 2022 purple is reflecting 367 (total of 168 + 199).  I am wanting the June 2022 purple to show at 199 (approximately where I have the red line.

Here is the measure I am using

1 ACCEPTED SOLUTION
Community Support

Hi, @gvanbuhler ;

May be you could create two measure for 2021 and 2022.

``2021 = CALCULATE(COUNT('Table'[value]),FILTER('Table',YEAR([Date])=2021))``
``2022 = CALCULATE(COUNT([value]),FILTER('Table',YEAR([Date])=2022))``

The final show:

Best Regards,
Community Support Team _ Yalan Wu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

8 REPLIES 8
Community Support

Hi, @gvanbuhler ;

May be you could create two measure for 2021 and 2022.

``2021 = CALCULATE(COUNT('Table'[value]),FILTER('Table',YEAR([Date])=2021))``
``2022 = CALCULATE(COUNT([value]),FILTER('Table',YEAR([Date])=2022))``

The final show:

Best Regards,
Community Support Team _ Yalan Wu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Frequent Visitor

I was able to get both 2021 and 2022 measures in the Y-axis, but it is still not appearing correctly in the area graph

Frequent Visitor

Can you show me your Visualizations pane? Mine is not allowing me to put two Y-axis

Frequent Visitor

I figured it out, I had the Stacked Area Chart instead of just he Area Chart

Community Support

Hi, @gvanbuhler ,

Try it ,

``````measure =
CALCULATE ( COUNT ( [id] ), FILTER ( 'table', YEAR ( [date] ) = 2022 ) )
``````

Since your X -axis has only months and no year, it is the sum of 2021-2022 before July, and it is necessary to use the measure to filter the year to 2022.

Best Regards,
Community Support Team _ Yalan Wu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Frequent Visitor

Which Axis should that measure be?  I'm wanting to show the year differences with the different color areas

Frequent Visitor

When I do a Count I'm getting the same result

And if I do the Trip ID and count it, same results

Super User

@gvanbuhler , In this visual, simple count visual should do

Announcements

#### Europe’s largest Microsoft Fabric Community Conference

Join the community in Stockholm for expert Microsoft Fabric learning including a very exciting keynote from Arun Ulag, Corporate Vice President, Azure Data.