Check your eligibility for this 50% exam voucher offer and join us for free live learning sessions to get prepared for Exam DP-700.
Get StartedDon't miss out! 2025 Microsoft Fabric Community Conference, March 31 - April 2, Las Vegas, Nevada. Use code MSCUST for a $150 discount. Prices go up February 11th. Register now.
Hi everybody,
I am trying to calculate the previous KM for the same car plate.
I tried a Dax Formula to calculate the previous value, but it actually returns the value for the next Checklist. I tried to modify the operators, and also tried LASTNORBLANK instead of FIRSTNONBLANK, but it didn't give me the expected values..
Can anybody help me with this, please?
Thank you
Solved! Go to Solution.
Hi @renanc
please use
KM Anterior =
VAR PlateNumTable =
CALCULATETABLE (
fChecklists,
ALLEXCEPT ( fChecklists, fChecklists[DescPlaca] )
)
VAR PreviousTimes =
FILTER (
PlateNumTable,
PlateNumTable[DtCadastro] < EARLIER ( PlateNumTable[DtCadastro] )
)
VAR PreviousTime =
MAXX ( PreviousTimes, PlateNumTable[DtCadastro] )
RETURN
MAXX ( PreviousTimes, PlateNumTable[DtCadastro] = PreviousTime )
Hi @renanc
please use
KM Anterior =
VAR PlateNumTable =
CALCULATETABLE (
fChecklists,
ALLEXCEPT ( fChecklists, fChecklists[DescPlaca] )
)
VAR PreviousTimes =
FILTER (
PlateNumTable,
PlateNumTable[DtCadastro] < EARLIER ( PlateNumTable[DtCadastro] )
)
VAR PreviousTime =
MAXX ( PreviousTimes, PlateNumTable[DtCadastro] )
RETURN
MAXX ( PreviousTimes, PlateNumTable[DtCadastro] = PreviousTime )
March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount! Prices go up Feb. 11th.
Check out the January 2025 Power BI update to learn about new features in Reporting, Modeling, and Data Connectivity.
User | Count |
---|---|
21 | |
15 | |
14 | |
11 | |
7 |
User | Count |
---|---|
26 | |
23 | |
12 | |
11 | |
10 |