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

Earn the coveted Fabric Analytics Engineer certification. 100% off your exam for a limited time only!

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
April AMA free

Microsoft Fabric AMA Livestream

Join us Tuesday, April 09, 9:00 – 10:00 AM PST for a live, expert-led Q&A session on all things Microsoft Fabric!

March Fabric Community Update

Fabric Community Update - March 2024

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