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

To celebrate FabCon Vienna, we are offering 50% off select exams. Ends October 3rd. Request your discount now.

Reply
Harsh991100
Regular Visitor

Dax column in powerbi

I have a data in Power BI table view that is coming from a dataflow. Now I want to create a DAX function where if I refresh the data and then new rows comes in, it should return " new " in front of those rows which are added now and "old "in front of the rows which were present earlier also.

Similarly if i refresh the data the next time, the rows which are now considered as new should be represented as "old" and and the new entry should be represented as "new"

5 REPLIES 5
Harsh991100
Regular Visitor

Thanks for your reply.

There is not date column in thr backend data. Do you know how i can create a date column whicch fix the rows with the date of refresh.

For eg : if there are 10 rows in my data and refresh my powerbi and now 5 new rows are added, it should return the date when the refresh was done on these new 5 rows, similarly if i refresh the dashboard again after let say 7 days and then 4 new rows comes, it should return that particular refresh date along those 4 rows.

Technically there is an option where you can self- reference a Power BI dataset during the ETL, but this is very complex and has no safety net. My recommendation would be to maintain that column in the upstream system.

Can you guide me how to do this?

Explaining the problem statement in detail:

So for eg i have 10 rows in my data currently.
I want that this data should be stored somewhere.
Now let say i will refresh my data on 22 December and 5 rows are being added, then the base of the data will be of 15 rows, then this 15 rows data would be compared with 10 rows data on a unique key i.e Code and look which all Code which are there in 15 rows data were present in 10 rows data, it would return old in front of the Code which are present in 10 rows data and would return New on those new 5 added rows.
Now for the next refresh i.e on 25 December the stored data would be of 15 rows and let say if after refresh 3 more rows are added and the base data becomes of 18 rows, it would then compare 18 rows with those 15 rows and return New and Old according to condition specified above.
So in short it should change the store data every time after each refresh.
I want to do this in powerbi python query

I want that this data should be stored somewhere.

you will want to be a bit more specific. Do you have a OneDrive or SharePoint where you can store your snapshots?

then this 15 rows data would be compared with 10 rows data on a unique key 

you need two keys - the row identifier and the date stamp.

I want to do this in powerbi python query

you are free to want that. But Power BI doesn't support it.

 

lbendlin
Super User
Super User

Power BI has no memory, and no idea what you mean by "new"  and "old".  You need to bring your own identifiers (like a timestamp column for the created date).

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.

August 2025 community update carousel

Fabric Community Update - August 2025

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

Top Solution Authors
Top Kudoed Authors