cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
VinnyH
Frequent Visitor

Dynamic Variance Month to Month

I've been trying all day to get a variance measure to work for the below matrix.

The data is filtered and split into the matrix according to the below screenshots.

 

FilterShot.PNG

 

What I'm trying to show is the difference in margin from one month to the next in as dynamic a way as possible.

Example: I could click the July column and the difference in margin from June would be displayed, and then click on June and the difference from May would be displayed, and so on.

 

 

MatrixShot.PNG

 

I've experimented with a few measures I've pinched from some other questions of a similar nature to no avail:

 

ThisMonth = CALCULATE(SUM('AllMonths'[True Margin]),PARALLELPERIOD(AllMonths[Date],0,MONTH))
PrevMonth = CALCULATE(SUM('AllMonths'[True Margin]),PARALLELPERIOD('AllMonths'[Date],-1,MONTH))
Difference = [ThisMonth]-[PrevMonth]
 
I've had a small amount of success with the above, however a snag has been that I've had to hold Ctrl & click the second column to indicate which columns I'd like to show the difference between. The problem I've found with this is this displays correctly for the current month variance vs most recent previous month (July vs June respectively). But past that the sums seem to add together rather than show a variance, leading me to believe the measures aren't dynamic past the first Month's data.
 
Any help would be greatly appreciated.

 

1 ACCEPTED SOLUTION
v-shex-msft
Community Support
Community Support

HI @VinnyH ,

Can you please share some sample data for test? It is hard to modify and test without any detail information.

How to Get Your Question Answered Quickly
In addition you can also take a look at following blog to use date functions to manually define filter ranges.

Time Intelligence "The Hard Way" (TITHW)

Regards,

Xiaoxin Sheng

Community Support Team _ Xiaoxin
If this post helps, please consider accept as solution to help other members find it more quickly.

View solution in original post

1 REPLY 1
v-shex-msft
Community Support
Community Support

HI @VinnyH ,

Can you please share some sample data for test? It is hard to modify and test without any detail information.

How to Get Your Question Answered Quickly
In addition you can also take a look at following blog to use date functions to manually define filter ranges.

Time Intelligence "The Hard Way" (TITHW)

Regards,

Xiaoxin Sheng

Community Support Team _ Xiaoxin
If this post helps, please consider accept as solution to help other members find it more quickly.

Helpful resources

Announcements
Carousel_PBI_Wave1

2023 Release Wave 1 Plans

Power BI release plans for 2023 release wave 1 describes all new features releasing from April 2023 through September 2023.

Power BI Summit Carousel 2

Global Power BI Training

Make sure you register today for the Power BI Summit 2023. Don't miss all of the great sessions and speakers!

Thank you 2022 Review

2022 Monthly Feature Releases

We had a great 2022 with a ton of feature releases to help you drive a data culture.