The ultimate Fabric, Power BI, SQL, and AI community-led learning event. Save €200 with code FABCOMM.
Get registeredCompete to become Power BI Data Viz World Champion! First round ends August 18th. Get started.
Hi , How would I add previous transaction in the Prev_trans columm
Solved! Go to Solution.
@JunMenoza You need a variation on MTBF. See my article on Mean Time Between Failure (MTBF) which uses EARLIER: http://community.powerbi.com/t5/Community-Blog/Mean-Time-Between-Failure-MTBF-and-Power-BI/ba-p/3395....
The basic pattern is:
Column =
VAR __Current = [Value]
VAR __PreviousDate = MAXX(FILTER('Table','Table'[Date] < EARLIER('Table'[Date])),[Date])
VAR __Previous = MAXX(FILTER('Table',[Date]=__PreviousDate),[Value])
RETURN
__Current - __Previous
Hi:
If you can put the date in the table e.g. 4-10-2021 and add an index column using Power Query (1 -8) then this calculated column will work for you.
To put an index column in, go to transform data, "add index column (from 1). Here is an example file. I hope this solves your question!
https://drive.google.com/file/d/1NmKBreErOFNw8EqCo3yHMvItL_p7QZkE/view?usp=sharing
Hi:
If you can put the date in the table e.g. 4-10-2021 and add an index column using Power Query (1 -8) then this calculated column will work for you.
To put an index column in, go to transform data, "add index column (from 1). Here is an example file. I hope this solves your question!
https://drive.google.com/file/d/1NmKBreErOFNw8EqCo3yHMvItL_p7QZkE/view?usp=sharing
@JunMenoza You need a variation on MTBF. See my article on Mean Time Between Failure (MTBF) which uses EARLIER: http://community.powerbi.com/t5/Community-Blog/Mean-Time-Between-Failure-MTBF-and-Power-BI/ba-p/3395....
The basic pattern is:
Column =
VAR __Current = [Value]
VAR __PreviousDate = MAXX(FILTER('Table','Table'[Date] < EARLIER('Table'[Date])),[Date])
VAR __Previous = MAXX(FILTER('Table',[Date]=__PreviousDate),[Value])
RETURN
__Current - __Previous
User | Count |
---|---|
28 | |
12 | |
8 | |
7 | |
5 |
User | Count |
---|---|
36 | |
14 | |
12 | |
7 | |
7 |