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
Sertan_CPH
Frequent Visitor

Two table comparison based on date

In product development we keep bill of materials (BOM) with cost information. I upload the current BOM every week. These BOMs are aggrageted in a querry wich returns a table of BOMs appended together with a date column. So one can see the cost of a particular BOM at a certain date. Below shows part of the table.

Sertan_CPH_0-1622104604789.png

What I want to achieve is to select two particular dates and see the changes in column 'functions', such electrical (EL), mechanical (ME), packaging (PKG). The purpose is to see what was the assumption for PKG back then and what is it now. I need a table that returns only those items that are different in that particular category.  It is all about change traking. Because cost increases or decreases in a development happens, but taking necessary actions is the key. Without knowing what is causing the change, one can't tackle the problem. Can anyone help me with how to go about this issue? 

1 ACCEPTED SOLUTION
v-yetao1-msft
Community Support
Community Support

Hi @Sertan_CPH 

You can create relationships between two tables based on date ,and then detect whether the status for column 'functions' is changed .

Or you can use TREATAS() dax to transport filters from (unrelated) tables .

The usage for TREATAS() dax can refer to the link :

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

 

Best Regards

Community Support Team _ Ailsa Tao

 

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
v-yetao1-msft
Community Support
Community Support

Hi @Sertan_CPH 

You can create relationships between two tables based on date ,and then detect whether the status for column 'functions' is changed .

Or you can use TREATAS() dax to transport filters from (unrelated) tables .

The usage for TREATAS() dax can refer to the link :

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

 

Best Regards

Community Support Team _ Ailsa Tao

 

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

Ashish_Mathur
Super User
Super User

Hi,

On a simple dataset (which can be pasted in MS Excel), show the expected result.


Regards,
Ashish Mathur
http://www.ashishmathur.com
https://www.linkedin.com/in/excelenthusiasts/
lbendlin
Super User
Super User

I recommend you look at the TREATAS() function, it allows you to transport filters from (unrelated) tables, but it also allows you to do sliding window comparisons in the same table.

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.