The ultimate Fabric, Power BI, SQL, and AI community-led learning event. Save €200 with code FABCOMM.
Get registeredEnhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.
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?
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
Proud to be a Super User!
User | Count |
---|---|
26 | |
12 | |
8 | |
8 | |
5 |
User | Count |
---|---|
30 | |
15 | |
12 | |
12 | |
7 |