cancel
Showing results for
Did you mean:
Post Patron

Variance Help

Hi All:

I have the below data set that references volunteerism in January of 2016 & 2017. Can someone show me how to get the variance to display. I want to see that the difference between hours volunteered in 2016 & 2017 is '1186'.

1 ACCEPTED SOLUTION
Microsoft

Create a column using DAX below.

```variance =
var previous= CALCULATE(MAX(Table2[Volunteer Hours]),FILTER(Table2,Table2[Month in Year]=EARLIER(Table2[Month in Year])&& 'Table2'[Year]<EARLIER('Table2'[Year])))
return
IF(ISBLANK(previous),0, 'Table2'[Volunteer Hours]-previous)```

If you get any issues, please share table structure with raw data.

Regards,

Community Support Team _ Lydia Zhang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
3 REPLIES 3
Microsoft

Create a column using DAX below.

```variance =
var previous= CALCULATE(MAX(Table2[Volunteer Hours]),FILTER(Table2,Table2[Month in Year]=EARLIER(Table2[Month in Year])&& 'Table2'[Year]<EARLIER('Table2'[Year])))
return
IF(ISBLANK(previous),0, 'Table2'[Volunteer Hours]-previous)```

If you get any issues, please share table structure with raw data.

Regards,

Community Support Team _ Lydia Zhang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Post Patron

for some reason this formula isnt working or recognizing my table for calendar? I have the hours information that you seen in my original post and I have a table that I built that has the calendar details... do you know what could be causing this to arise?

Microsoft

@nmck86,

Right click your table, select New Column and put the DAX there.

Regards,

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

Announcements

2021 Release Wave 2 Plan

Power Platform release plan for the 2021 release wave 2 describes all new features releasing from October 2021 through March 2022.

Microsoft named a Leader in The Forrester Wave

Microsoft received the highest score of any vendor in both the strategy and current offering categories.

Microsoft Dynamics 365 & Power Platform User Professionals

DynamicsCon is a FREE, 4 half-day virtual learning experience for 11,000+ Microsoft Business Application users and professionals.

Top Solution Authors
Top Kudoed Authors