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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
deanbland
Helper III
Helper III

Comparing Datasets

Hi, 

 

I am wanting to compare this month's entire dataset to last months entire dataset to see if anything has changed. Is there a way to create a calculated column in the 'current months' report that assigns a 1 next to any row which is different compared to last months? 

 

PBIX file with example data can be found here 

 

https://drive.google.com/file/d/155WoUbjHNJYF456Wl1strfMdcXAv9mHl/view?usp=sharing

1 ACCEPTED SOLUTION
amitchandak
Super User
Super User

@deanbland , You can create a new table like

 

except(calculateTable(table, filter(Table, eomonth(Table[Date],0) = eomonth(today(),0))),calculateTable(table, filter(Table, eomonth(Table[Date],0) = eomonth(today(),-1))))

 

https://docs.microsoft.com/en-us/dax/except-function-dax

View solution in original post

2 REPLIES 2
v-lionel-msft
Community Support
Community Support

Hi @deanbland ,

 

Try to do like this.

1. Create a relationship.
(If you need to compare each row of two tables, then the two tables need to contain a unique identification column (primary key, foreign key)).

v-lionel-msft_0-1618205302433.png

2. Create a calculated column in 'Current Month' table.

Column = 
IF(
    [Account Name] = RELATED('Previous Month'[Account Name]) &&
    [Area Unit] = RELATED('Previous Month'[Area Unit]) &&
    [Assessment completed date] = RELATED('Previous Month'[Assessment completed date]) &&
    [Bid fully compliant with client requirements. If not, the variant approach has been approved at DCR] = RELATED('Previous Month'[Bid fully compliant with client requirements. If not, the variant approach has been approved at DCR]) &&
    [Budget Requested] = RELATED('Previous Month'[Budget Requested]) &&
    [Close Date] = RELATED('Previous Month'[Close Date]) &&
    [Date Review Held] = RELATED('Previous Month'[Date Review Held]) &&
    [Delivery Sign-off (DCR1) has been approved] = RELATED('Previous Month'[Delivery Sign-off (DCR1) has been approved]) &&
    [Engagement Complexity Assessment] = RELATED('Previous Month'[Engagement Complexity Assessment]) &&
    [Engagement Complexity Assessment completed and recommended level of Surveillance has been applied] = RELATED('Previous Month'[Engagement Complexity Assessment completed and recommended level of Surveillance has been applied]) &&
    [Export Date] = RELATED('Previous Month'[Export Date]) && 
    [Form Created Date] = RELATED('Previous Month'[Export Date]) &&
    [Form Id] = RELATED( 'Previous Month'[Form Id] ) &&
    [Form Owner] = RELATED('Previous Month'[Form Owner]) &&
    [Form Type] = RELATED('Previous Month'[Form Type])&&
    ...
    0,1
)

 

Best regards,
Lionel Chen

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

 

amitchandak
Super User
Super User

@deanbland , You can create a new table like

 

except(calculateTable(table, filter(Table, eomonth(Table[Date],0) = eomonth(today(),0))),calculateTable(table, filter(Table, eomonth(Table[Date],0) = eomonth(today(),-1))))

 

https://docs.microsoft.com/en-us/dax/except-function-dax

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

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