Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and more.
Get startedGrow your Fabric skills and prepare for the DP-600 certification exam by completing the latest Microsoft Fabric challenge.
Hello
I need help to create a new measure based on a Balance Amount field. The measure need to calculate the daily perfomance, wich is today balance - previous day balance, except when it is a new year. If it is 1/1 we would like to show the current balance for that day.
I have a screenshot from excel showing an example.
Hi @jakob82 ,
Here are the steps you can follow:
1. Create calculated column.
Column =
var _mindate=
MINX(
FILTER(ALL('Table'),YEAR('Table'[Date])=YEAR(EARLIER('Table'[Date]))),[Date])
var _current=
SUMX( FILTER(ALL('Table'),YEAR('Table'[Date])=YEAR(EARLIER('Table'[Date]))&&'Table'[Date]=EARLIER('Table'[Date])),[Value])
var _last=
SUMX( FILTER(ALL('Table'),YEAR('Table'[Date])=YEAR(EARLIER('Table'[Date]))&&'Table'[Date]=EARLIER('Table'[Date])-1),[Value])
return
IF(
'Table'[Date]=_mindate,'Table'[Value],
_current - _last)
2. Result:
Best Regards,
Liu Yang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly
Ok thanks!
I thoght I had a solution with following measures:
Measure for Previous day balance:
GL Balance Amount Previous Day:=CALCULATE([GL Balance Amount], PREVIOUSDAY('Dim Balance Date'[Balance Date]), DATESYTD('Dim Balance Date'[Balance Date]))
Then a measure based on current day balance - Previous Day balance:
GL Balance Amount - Daily Change:=CALCULATE([GL Balance Amount] - [GL Balance Amount Previous Day])
And "GL Balance Amount - Daily Change" shows exactly what i want, EXCEPT when I look at the grand total.
The total show wrong total amount.. It is very weird I think. Any Idea what it is?
User | Count |
---|---|
47 | |
44 | |
19 | |
14 | |
14 |
User | Count |
---|---|
107 | |
57 | |
29 | |
20 | |
16 |