Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.
Register now!The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more
hi all,
i have this sale table.how do i write the forumla so that the value will show example for Day 1 - 20 sales was made and so on.
I tried using earlier function but lost along the way.
| Day | Column A | Difference |
| Day 1 | 100 | 20 |
| Day 2 | 120 | 19 |
| Day 3 | 139 | 149 |
| Day 4 | 188 |
Thank you very much.
Solved! Go to Solution.
@Anonymous
why do you 149, not 49 in the last row?
try
Difference =
var _nextVal = CALCULATE(MIN('Table'[Column A]);FILTER(ALL('Table');'Table'[Column A]>EARLIER('Table'[Column A])))
RETURN
if(_nextVal>=[Column A];_nextVal-[Column A];blank())do not hesitate to give a kudo to useful posts and mark solutions as solution
is it possible to use column A for calculation only...
Perhaps it something simple but i couldnt get it right...
@Anonymous
try
Difference = [Column A]-CALCULATE(MAX('Table'[Column A]);FILTER(ALL('Table');'Table'[Column A]<EARLIER('Table'[Column A])))do not hesitate to give a kudo to useful posts and mark solutions as solution
@Anonymous
why do you 149, not 49 in the last row?
try
Difference =
var _nextVal = CALCULATE(MIN('Table'[Column A]);FILTER(ALL('Table');'Table'[Column A]>EARLIER('Table'[Column A])))
RETURN
if(_nextVal>=[Column A];_nextVal-[Column A];blank())do not hesitate to give a kudo to useful posts and mark solutions as solution
hi @Anonymous
if i understand you correct try a column
Difference = [Column A]-CALCULATE(MAX('Table'[Column A]);FILTER(ALL('Table');'Table'[Day]<EARLIER('Table'[Day])))
do not hesitate to give a kudo to useful posts and mark solutions as solution
The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!
| User | Count |
|---|---|
| 38 | |
| 36 | |
| 33 | |
| 32 | |
| 29 |
| User | Count |
|---|---|
| 129 | |
| 88 | |
| 79 | |
| 68 | |
| 63 |