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! Learn more
Hi everybody,
I am trying to calculate the difference of the KM between the checklists, for the same car plate (DescPlaca), and I am trying to do the Context in the same way I would do for DATEDIFF, but for some reason it does not work. Can anybody help me with this, please?
I wanna calculate the "Digite a KM" value less the Previous checklist "Digite a KM" value, for this, I have to use IdChecklist, so the IdChecklist for the first term has to be bigger than IdChecklist for the second term, and DescPlaca has to be equal.
I am trying to use the following dax. can anybody spot what is wrong, please?
Hi @amitchandak, I was trying to create as a measure, now I tried to create anew column.
In the var _min calculation, the Dax recognizes the columns DescPlaca and IdQuestionario, but in the calculation in the return, these columns are not recognized. The following mesage appears:
@renanc , A new column like
Diferenca KM =
var _min =
CALCULATE(
FIRSTNONBLANK(fChecklists[IdChecklist],0),
FILTER(
ALL(fChecklists),
fChecklists[IdChecklist] > EARLIER([IdChecklist])
&& fChecklists[DescPlaca]=EARLIER([DescPlaca])
&& fChecklists[DtCadastro] >= EARLIER([DtCadastro])
&& fChecklists[IdQuestionario] = EARLIER([IdQuestionario])
)
)
return
CALCULATE(
min([Digite a KM])
FILTER(
ALL(fChecklists),
fChecklists[IdChecklist] = _min
&& fChecklists[DescPlaca]=EARLIER([DescPlaca])
&& fChecklists[IdQuestionario] = EARLIER([IdQuestionario])
)
) - [Digite a KM]
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 |
|---|---|
| 9 | |
| 5 | |
| 4 | |
| 3 | |
| 3 |
| User | Count |
|---|---|
| 12 | |
| 10 | |
| 10 | |
| 9 | |
| 8 |