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
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.
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.
| User | Count |
|---|---|
| 8 | |
| 6 | |
| 6 | |
| 5 | |
| 4 |
| User | Count |
|---|---|
| 25 | |
| 16 | |
| 8 | |
| 8 | |
| 8 |