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
Conn811
Regular Visitor

Detect and store change in source value

Hi,

 

I'm importing (not DirectQuery) data from a SQL db that I do not controll. 

For one of the tables i need to detect, and store the date, when a cell value changes.

For instance, image the table below (just an example).

I want to detect when a car is sold (Status = Sold) and store that date when it was registered as sold(for instance in a calculated column in PowerBI)

 

How do i manage that? Is it possible to use DAX to query that last import? 

 

Example on a code syntax

IF( Source.Status == "Sold")

   IF( OldImported.Status != "Sold)

      NewImported.Date = TodaysDate()

  ELSE

      NewImported.Date = OldImported.Date

ELSE

   NewImported.DateSold = ""

 

IdDescriptionPriceStatus
12011 VW Passat $ 65 000,00Available
22012 VW Touran $ 75 000,00Available
32008 VW Passat $ 49 000,00Not available
42016 VW Passat $ 83 000,00Sold
52010 VW Touran $ 58 000,00Available
62012 VW Golf $ 66 000,00Not available

 

1 ACCEPTED SOLUTION
TomMartens
Super User
Super User

Hey,

 

unfortunately this is not possible, due to the following.

Basically you are importing the full data from the database.

The OldImported.Date will be calculated during the load, this means you can't use an existing value.

 

There may be a possibility to circumvent the mentioned above if you are on Power Premium and just load increments, but this woluld also mean that you have identify the increment, the change in the source data.

Here you will an introduction into incremental refresh of Power BI Service:

https://docs.microsoft.com/en-us/power-bi/service-premium-incremental-refresh

 

Regards,

Tom 



Did I answer your question? Mark my post as a solution, this will help others!

Proud to be a Super User!
I accept Kudos 😉
Hamburg, Germany

View solution in original post

2 REPLIES 2
TomMartens
Super User
Super User

Hey,

 

unfortunately this is not possible, due to the following.

Basically you are importing the full data from the database.

The OldImported.Date will be calculated during the load, this means you can't use an existing value.

 

There may be a possibility to circumvent the mentioned above if you are on Power Premium and just load increments, but this woluld also mean that you have identify the increment, the change in the source data.

Here you will an introduction into incremental refresh of Power BI Service:

https://docs.microsoft.com/en-us/power-bi/service-premium-incremental-refresh

 

Regards,

Tom 



Did I answer your question? Mark my post as a solution, this will help others!

Proud to be a Super User!
I accept Kudos 😉
Hamburg, Germany

Hi

 

I feared that might be the case. Thank you very much for the answer.

 

Regards,

 

Pål-Arve Nilsen

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.