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

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

Reply
Helen075
New Member

Measure for comparing month to month based on two columns

I am looking for a measure that tracks the change in unique ID numbers, with the ability to break down the changes per area and rating. For example, I have two tables below, one from July and another from June and need to see the differences between the two, similar to the third table below.

 

I have the below measure that works when I have the Area in a matrix table but stops working once I drill down to the Ratings.

 

Any help would be much appreciated!

 

Net Change =
VAR CurrentArea = SELECTEDVALUE('July'[Area])
VAR Added =
    COUNTROWS(
        EXCEPT(
            CALCULATETABLE(
                VALUES('July'[ID]),
                'July'[Area] = CurrentArea
            ),
            CALCULATETABLE(
                VALUES('June'[ID]),
                'June'[Area] = CurrentArea
            )
        )
    )
VAR Removed =
    COUNTROWS(
        EXCEPT(
            CALCULATETABLE(
                VALUES('June'[ID]),
                'June'[Area] = CurrentArea
            ),
            CALCULATETABLE(
                VALUES('July'[ID]),
                'July'[Area] = CurrentArea
            )
        )
    )
RETURN
Added - Removed

 

June

AreaIDRating
A0012
B0031
B0041
C0051
C0061

 

July

AreaIDRating
A0012
A0071
B0031
C0051
C0061

 

End result

AreaRatingChange
A1+1
A20
B1-1
B20
C10
C20

 

1 ACCEPTED SOLUTION
audreygerred
Super User
Super User

Hello! Instead of having a separate table for each month, I would have one table and add a date column (just pick a random date in the month). Then you can easily use time intelligence of MoM.

 

Something like this:

audreygerred_0-1755191555151.png

 

Your output could be like this:

audreygerred_2-1755192155644.png

 

 

Rating Total TM = SUM('Table'[Rating]
Rating Total LM = CALCULATE([Rating Total TM], DATEADD('Table'[Date].[Date],-1,MONTH))
MoM Change = [Rating Total TM]-[Rating Total LM]

 

 





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

Proud to be a Super User!





View solution in original post

4 REPLIES 4
v-pgoloju
Community Support
Community Support

Hi @Helen075,

 

Just following up to see if the Response provided by community member were helpful in addressing the issue.

If one of the responses helped resolve your query, please consider marking it as the Accepted Solution. Feel free to reach out if you need any further clarification or assistance.

 

Best regards,
Prasanna Kumar

v-pgoloju
Community Support
Community Support

Hi @Helen075,

 

Just following up to see if the Response provided was helpful in resolving your issue. Please feel free to let us know if you need any further assistance.

 

Best regards,

Prasanna Kumar

v-pgoloju
Community Support
Community Support

Hi @Helen075,

 

Thank you for reaching out to the Microsoft Fabric Forum Community, and special thanks to @audreygerred  for prompt and helpful response.

Just following up to see if the Response provided by community member were helpful in addressing the issue.

If one of the responses helped resolve your query, please consider marking it as the Accepted Solution. Feel free to reach out if you need any further clarification or assistance.

Best regards,
Prasanna Kumar

audreygerred
Super User
Super User

Hello! Instead of having a separate table for each month, I would have one table and add a date column (just pick a random date in the month). Then you can easily use time intelligence of MoM.

 

Something like this:

audreygerred_0-1755191555151.png

 

Your output could be like this:

audreygerred_2-1755192155644.png

 

 

Rating Total TM = SUM('Table'[Rating]
Rating Total LM = CALCULATE([Rating Total TM], DATEADD('Table'[Date].[Date],-1,MONTH))
MoM Change = [Rating Total TM]-[Rating Total LM]

 

 





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

Proud to be a Super User!





Helpful resources

Announcements
September Power BI Update Carousel

Power BI Monthly Update - September 2025

Check out the September 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
Top Kudoed Authors