Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.
Hi All
Below measure working fine :-
May i know how to clear the error ?
Below my PBI file :-
Paul Yeo
Solved! Go to Solution.
Hi, @admin11
Have your problem been solved? I checked your file, It seems that the third parameter in TOTALYTD can only write one filter, and the second will become the fourth parameter by default, causing errors, but the actual calculation will be included.
You can easily use calculate to remove red error.
Like this:
_LYTD_REV TDS =
VAR _max =
DATE ( YEAR ( TODAY () ) - 1, MONTH ( TODAY () ), DAY ( TODAY () ) )
RETURN
CALCULATE (
TOTALYTD (
( 'GL'[AMOUNT_REV] ),
DATEADD ( 'Date'[Date], -1, YEAR ),
'Date'[Date] <= _max
),
FILTER ( GL, [SOURCE] = "TS" )
)
Best Regards
Janey Guo
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi, @admin11
Have your problem been solved? I checked your file, It seems that the third parameter in TOTALYTD can only write one filter, and the second will become the fourth parameter by default, causing errors, but the actual calculation will be included.
You can easily use calculate to remove red error.
Like this:
_LYTD_REV TDS =
VAR _max =
DATE ( YEAR ( TODAY () ) - 1, MONTH ( TODAY () ), DAY ( TODAY () ) )
RETURN
CALCULATE (
TOTALYTD (
( 'GL'[AMOUNT_REV] ),
DATEADD ( 'Date'[Date], -1, YEAR ),
'Date'[Date] <= _max
),
FILTER ( GL, [SOURCE] = "TS" )
)
Best Regards
Janey Guo
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
I'm not 100% sure but you can clean it up a little by removing the Filter function. This shouldn't be needed as the TOTALYTD function is already expecting a filter here.
LYTD_REV TDS =
VAR _max =
DATE ( YEAR ( TODAY () ) - 1, MONTH ( TODAY () ), DAY ( TODAY () ) )
RETURN
TOTALYTD (
( 'GL'[AMOUNT_REV] ),
DATEADD ( 'Date'[Date], -1, YEAR ),
'Date'[Date] <= _max,
GL[SOURCE] = "TS"
)
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
109 | |
99 | |
77 | |
66 | |
54 |
User | Count |
---|---|
144 | |
104 | |
101 | |
86 | |
64 |