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

Enhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.

Reply
Samuel7265
Frequent Visitor

Create a new Table with only the last Case steps from a existing Table

Unbenannt.jpg

Hi, i´ve been trying to create a new Table using the Summarize(), Addcolums() and Lastnonblank() function.

 

I have a table called "Bearbeitung" which lists all cases with their single steps, this table is sorted in Querry by date (increasing).

I want to create a new Table called "letzte Bearbeitung" which lists for every distinct case "Vorgangs_ID" the the last step based on the last time it was edited.

 

I ran into an error. My code doesnt work right. The LASTNONBLANK() funktion wont give the last result for ID_Nonth_UserID and Status_after_Handling. Don't know why, what am i doing wrong here? Is there maybe a better solution using the GROUPBY() function?

 

 

1 REPLY 1
some_bih
Super User
Super User

Hi @Samuel7265 I do not your language, my bad :), to understand more what is your issue / request.

Nevertheless, using function LASTNONBLANK(), there is context transition happening so you probably needed to use it.

Back to your code: 

Pattern ADDCOLUMNS (SUMMARIZE(  

in DAX is very common, but in you case based on my experience, you should rewrite it.

I do not have enought info what is your model and details, still the best practice to use SUMMARIZE is not TO ADD columns into it; in your case you should try to rewrite your code so you have

ADDCOLUMNS (SUMMARIZE(  f_L_Bearbeitung, <rest of your code>DO NOT PUT new column before closing ), <Here put new columns; "Status..." up to "Editing" and close)

Basically, you wrap up core code.  Hope this help





Did I answer your question? Mark my post as a solution!

Proud to be a Super User!






Helpful resources

Announcements
July 2025 community update carousel

Fabric Community Update - July 2025

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

July PBI25 Carousel

Power BI Monthly Update - July 2025

Check out the July 2025 Power BI update to learn about new features.