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

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
Amos_Lim
Resolver I
Resolver I

Comparison Between Current with Previous Month

My table contains the individual month records that include Measure Date/Time, C-No, A-Set, Height-A/B, Thickness-A/B,

Gradient-A/B, P and R Date.

I would like to calculate and compare data between the current and the previous month, based on the following conditions:

  1. When C-No and A-set match.
  2. When C-No & A-set repeat within a single month, consider only the data from the most recent occurrence for the calculations. For instance, if the same C-No and A-set are recorded on both January 4th and January 20th, use only the data from January 20th for calculations.
  3. Perform calculations (Height-A, Height-B, Thickness-A, Thickness-B, Gradient-A, and Gradient-B) current month's data minus the previous month's data, only if the P OR R-Date is falls outside the dates of the current and previous month, display "Nil." if no calculation is happened.

Refer to the attached files, the samples for both PB and Excel.

 

Sample Files 

Thanks for the help.

2 REPLIES 2
Anonymous
Not applicable

Hi @Amos_Lim 

 

Please present your example data and desired results in excel format. So that we can help you better. Please remove any sensitive data in advance.

 

Best Regards,
Yulia Xu

Please find a sample file attached.

It compares January to February.

The comparisons between February and March, March and April, and so on are identical.

 

Sample File 

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

December 2025 Power BI Update Carousel

Power BI Monthly Update - December 2025

Check out the December 2025 Power BI Holiday Recap!

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.