Advance your Data & AI career with 50 days of live learning, dataviz contests, hands-on challenges, study groups & certifications and more!
Get registeredGet Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now
Aiuto! Ciao a tutti,scusate ma non sono molto pratico e devo poter calcolare l'ultimo valore (determinato dall'ultimo dato di inserimento del movimento) per singolo articolo in una tabella dove sono presenti molti articoli.Ho provato di tutto ma senza riuscirvi Se qualcuno ha qualche suggerimento lo ringrazio in anticipo
Denis
Solved! Go to Solution.
@Denpowerbi You can try to create following measure:
LastValueForArticle =
VAR MaxDate = CALCULATE(MAX('Articles'[Date]), ALLEXCEPT('Articles', 'Articles'[ArticleID]))
RETURN
CALCULATE(SUM('Articles'[Value]), 'Articles'[Date] = MaxDate)
This DAX measure does the following:
It first calculates the maximum date for each article (MaxDate) by using CALCULATE and MAX functions. The ALLEXCEPT function removes all filters except for the ArticleID.
Then, it uses CALCULATE again to filter the Value column to only include rows where the date matches the maximum date calculated earlier.
If you find this insightful, please provide a Kudo and accept this as a solution.
Grazie!!!!!! Mi sei stato veramente utile e gentile
@Denpowerbi Welcome! but I noticed that you marked your own thankyou comment as a solution...
Can you please mark the actual solution as an accepted solution, it would be a great help to me and to others also.
Grazie!!!!!! Mi sei stato veramente utile e gentile
@Denpowerbi Welcome! but I noticed that you marked your own thankyou comment as a solution...
Can you please mark the actual solution as an accepted solution, it would be a great help to me and to others also.
@Denpowerbi You can try to create following measure:
LastValueForArticle =
VAR MaxDate = CALCULATE(MAX('Articles'[Date]), ALLEXCEPT('Articles', 'Articles'[ArticleID]))
RETURN
CALCULATE(SUM('Articles'[Value]), 'Articles'[Date] = MaxDate)
This DAX measure does the following:
It first calculates the maximum date for each article (MaxDate) by using CALCULATE and MAX functions. The ALLEXCEPT function removes all filters except for the ArticleID.
Then, it uses CALCULATE again to filter the Value column to only include rows where the date matches the maximum date calculated earlier.
If you find this insightful, please provide a Kudo and accept this as a solution.
Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!
Check out the October 2025 Power BI update to learn about new features.