Power BI is turning 10! Tune in for a special live episode on July 24 with behind-the-scenes stories, product evolution highlights, and a sneak peek at what’s in store for the future.
Save the dateEnhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.
Hi, I have a calculated column that should get the previous timestamp budget amount, however this is only showing the previous date, not timestamp, my usuage is then wrong, which makes my report show a total which is completely wrong, can anyone help with this?
Previous timestamp value is wrong on two dates, first 12/13/2018 and secondly on 1/2/2020
This is the column that is wrong and not always showing the previous value:
Usage since last ts is simply:
Solved! Go to Solution.
@Anonymous , try both a new columns
Previous TimeStamp = maxx(filter(Table, [case id] =earlier([case id]) && [original Time Stamp] <earlier([original Time Stamp])),[original Time Stamp])
Previous TimeStamp Value= maxx(filter(Table, [case id] =earlier([case id]) && [original Time Stamp] =earlier([Previous TimeStamp])),[totalBudgetAmount])
Hi @Anonymous ,
1. Check the Data Type in Power Query . It should be Date Time.
2. Check whether any values are getting summarised by default in the pane. Make all as Don't Summarize.
You can use these measures too
Use these Measures:
Previous CaseId =
VAR a =
MAX ( 'Table'[originalTimeStamp] )
VAR b =
CALCULATE (
MAX ( Table[caseId] ),
FILTER (
ALL (
Table[CaseID],
Table[originalTimeStamp],
Table[totalBudgetAmount]
),
Table[originalTimeStamp] < a
&& Table[CaseID]
= MAX ( Table[CaseID] )
)
)
RETURN
b
Previous DateStamp =
VAR a =
MAX ( 'Table'[originalTimeStamp] )
VAR b =
CALCULATE (
MAX ( Table[originalTimeStamp] ),
FILTER (
ALL (
Table[CaseID],
Table[originalTimeStamp],
Table[totalBudgetAmount]
),
Table[originalTimeStamp] < a
&& Table[CaseID]
= MAX ( Table[CaseID] )
)
)
RETURN
b
Previous Value2 =
VAR _previousDate = [Previous DateStamp]
VAR _previousCase = [Previous CaseId]
RETURN
CALCULATE (
MAX ( Table[totalBudgetAmount] ),
FILTER (
ALL ( Table),
Table[originalTimeStamp] = _previousDate
&& Table[CaseID] = _previousCase
)
)
Regards,
Harsh Nathani
Did I answer your question? Mark my post as a solution! Appreciate with a Kudos!!
@Anonymous , try both a new columns
Previous TimeStamp = maxx(filter(Table, [case id] =earlier([case id]) && [original Time Stamp] <earlier([original Time Stamp])),[original Time Stamp])
Previous TimeStamp Value= maxx(filter(Table, [case id] =earlier([case id]) && [original Time Stamp] =earlier([Previous TimeStamp])),[totalBudgetAmount])
User | Count |
---|---|
76 | |
75 | |
46 | |
31 | |
27 |
User | Count |
---|---|
99 | |
91 | |
51 | |
49 | |
45 |