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

Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM. Register now.

Reply
slhyrkl
Frequent Visitor

How to show variation for multiple data points?

I have a dataset which has multiple values for different dates for specific part numbers. These values are getting calculated monthly but that's a new process so most of the part numbers don't have a data point for every month. I am trying to show the variation for this calculated value between the months to figure out the part numbers with the most variations. How can I do that?

slhyrkl_0-1715372344443.png

 

1 ACCEPTED SOLUTION
Anonymous
Not applicable

Hi @slhyrkl ,

First of all, many thanks to @ryan_mayu  for your very quick and effective replies.

Based on my testing, please try the following methods:

1.Create the simple table.

vjiewumsft_0-1715591573561.png

2.Create the new measure to calculate the monthly values.

Monthly values = CALCULATE(SUM('Table'[Values]), FILTER('Table', 'Table'[Month]))

3.Create the new measure to calculate the monthly variation.

Month Variation = 
var numb = SELECTEDVALUE('Table'[Part number])
VAR pre = SUMX(FILTER(ALLSELECTED('Table'),[Month] = MAX('Table'[Month]) - 1 && [Part number] = numb),[Monthly values])
VAR SELE = MAX('Table'[Month])
var result = [Monthly values] - pre
RETURN
result

4.Drag the measure into the matrix visual.

vjiewumsft_1-1715591592401.png

5.The result is shown below.

vjiewumsft_2-1715591636400.png

Best Regards,

Wisdom Wu

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

View solution in original post

3 REPLIES 3
Anonymous
Not applicable

Hi @slhyrkl ,

First of all, many thanks to @ryan_mayu  for your very quick and effective replies.

Based on my testing, please try the following methods:

1.Create the simple table.

vjiewumsft_0-1715591573561.png

2.Create the new measure to calculate the monthly values.

Monthly values = CALCULATE(SUM('Table'[Values]), FILTER('Table', 'Table'[Month]))

3.Create the new measure to calculate the monthly variation.

Month Variation = 
var numb = SELECTEDVALUE('Table'[Part number])
VAR pre = SUMX(FILTER(ALLSELECTED('Table'),[Month] = MAX('Table'[Month]) - 1 && [Part number] = numb),[Monthly values])
VAR SELE = MAX('Table'[Month])
var result = [Monthly values] - pre
RETURN
result

4.Drag the measure into the matrix visual.

vjiewumsft_1-1715591592401.png

5.The result is shown below.

vjiewumsft_2-1715591636400.png

Best Regards,

Wisdom Wu

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

Hello @Anonymous and @ryan_mayu,

I appreciate your replies. I tried it and it worked perfectly. One problem that I came across though is the subtotals. When I try to show the subtotals, for some reason, it's not adding upp the montly values and month variation properly in the table as I attached below.

slhyrkl_0-1717527568105.png

When I try it on the example you shared with me, it shows the total properly as attached below;

slhyrkl_1-1717527652273.png

I was wondering you may know what the reason could be behind it?

 

 

ryan_mayu
Super User
Super User

could you pls provide some sample data and expected output?





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

Proud to be a Super User!




Helpful resources

Announcements
FabCon Global Hackathon Carousel

FabCon Global Hackathon

Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes!

October Power BI Update Carousel

Power BI Monthly Update - October 2025

Check out the October 2025 Power BI update to learn about new features.

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.

Top Solution Authors