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

how do I create a table out of the differences

I have been trying to capture the log changes on a table from the previous day, so here is what i have done:

 

I import two latest file from a folder and then do left outer (all rows from both merge) and calculate the differences by adding custom column, as these files changes everyday i want to capture the rows that had a differences only on a table to create a log of changes.

 

example data

 

file 1                                                                                              file 2

 

item      cost          type                                                                item            cost            type

car        600           toy                                                                  car              899             toy

Radio    200           electronics                                                       Tv               300             electronics

mobile   300          electronics                                                      mobile         300             electronics

 

combined table 

 

item          cost          type             table2.item            table2.cost                table2.type        difference in cost        differenceitem 

car             600          toy                car                          899                          toy                           299                            0

null             null        null                 Tv                           300                         electronics               -300                           TV

radio          200        electronics      null                         null                         null                           200                            radio

mobile       300        electronics      mobile                    300                         electronics                0                                0

 

 

now here i want to create a table out of first three rows which had difference from last file and would like to append these difference everyday on a table so i have a log of changes happening everyday 

2 REPLIES 2
amitchandak
Super User
Super User

@DeepakSavanur , Are these file from two different days. If yes, You should import file and add date column and then append.

 

Or use DAX append with date added

https://blog.crossjoin.co.uk/2020/04/13/keep-the-existing-data-in-your-power-bi-dataset-and-add-new-...
https://www.thebiccountant.com/2017/01/11/incremental-load-in-powerbi-using-dax-union/

 

 

then you can use time intelligence

Day Intelligence - Last day, last non continous day
https://medium.com/@amitchandak.1978/power-bi-day-intelligence-questions-time-intelligence-5-5-5c324...

This doesnt work for the kind off data that i have

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.

Top Solution Authors