Advance your Data & AI career with 50 days of live learning, dataviz contests, hands-on challenges, study groups & certifications and more!
Get registeredJoin us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM. Register now.
Hello guys,
How to calculate by DAX the data filtered by the last date that is not null and >0?
On the example below, the result hoped is to replace every blanks, 0's and numbers to 784,10.
@Anonymous , Try measure like
lastnonblankvalue(Table[Date], [Valore])
or
calculate(lastnonblankvalue(Table[Date], [Valore]), allexcept(Table, Table[part_number_sem#]))
or
measure = calculate([Valore], filter(Table,Table[Date] = calculate(max(Table[Date]), allexpcept(Table,table[part_number_sem#]))))
Not working... I tried to measure like
@Anonymous , Try like
Measure =
VAR __id = MAX ('Table'[PART_NUMBER_SEM_#] )
VAR __date = CALCULATE ( MAX('Table'[Date] ), ALLSELECTED ('Table' ), 'Table'[PART_NUMBER_SEM_#] = __id )
CALCULATE ( [Valor] , VALUES ('Table'[PART_NUMBER_SEM_# ),'Table'[PART_NUMBER_SEM_#] = __id,'Table'[Date] = __date )
Firstly I thank you for the disposition to help me with this problem.
However, it didn't work as well...
Obs.: I just renamed the "Measure" to "Val_Com"
Hi @Anonymous
What is the code for the [Valor] measure?
Please mark the question solved when done and consider giving a thumbs up if posts are helpful.
Contact me privately for support with any larger-scale BI needs, tutoring, etc.
Cheers
I used a divide and average function based on sale.
Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes!
Check out the October 2025 Power BI update to learn about new features.
| User | Count |
|---|---|
| 8 | |
| 6 | |
| 3 | |
| 3 | |
| 3 |
| User | Count |
|---|---|
| 11 | |
| 9 | |
| 8 | |
| 7 | |
| 6 |