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
I have below measure which is working :-
https://www.dropbox.com/s/9pmrb7teaoiqw7g/PBT_V2021_397%20GL_TS%20SAMPLE.pbix?dl=0
My PBI file above link :-
Solved! Go to Solution.
Hi @admin11 ,
I think I know what the problem is.
the before measure:
_LYTD EXP =
CALCULATE (
[AMOUNT],
GL[1_EXP] = "EXP",
DATESBETWEEN (
'Date'[Date],
DATE ( YEAR ( TODAY () ) - 1, 1, 1 ),
EOMONTH ( TODAY (), -13 ) + 1
)
)
Just as below,when i use the date mesuare,I get the date calculate is 2020/1/1 to 2020/4/1
And when I tried another measure, I get the date is to 2020/4/16 not 2020/4/1 ,due to this ,the two measure is different .
You also could use the following measure ,
_LYTD_EXP =
VAR _max =
DATE ( YEAR ( TODAY () ) - 1, MONTH ( TODAY () ), 1 )
RETURN
TOTALYTD (
( 'GL'[AMOUNT_EXP] ),
DATEADD ( 'Date'[Date], -1, YEAR ),
'Date'[Date] <= _max
)
Final you will get the same value:
Wish it is helpful for you!
Best Regards
Lucien
Hi @admin11 ,
I think I know what the problem is.
the before measure:
_LYTD EXP =
CALCULATE (
[AMOUNT],
GL[1_EXP] = "EXP",
DATESBETWEEN (
'Date'[Date],
DATE ( YEAR ( TODAY () ) - 1, 1, 1 ),
EOMONTH ( TODAY (), -13 ) + 1
)
)
Just as below,when i use the date mesuare,I get the date calculate is 2020/1/1 to 2020/4/1
And when I tried another measure, I get the date is to 2020/4/16 not 2020/4/1 ,due to this ,the two measure is different .
You also could use the following measure ,
_LYTD_EXP =
VAR _max =
DATE ( YEAR ( TODAY () ) - 1, MONTH ( TODAY () ), 1 )
RETURN
TOTALYTD (
( 'GL'[AMOUNT_EXP] ),
DATEADD ( 'Date'[Date], -1, YEAR ),
'Date'[Date] <= _max
)
Final you will get the same value:
Wish it is helpful for you!
Best Regards
Lucien
Hi @admin11 ,
When I click your link ,but could not download your pbix ,could you pls share your file again?
Best Regards
Lucien
Thank yo for look at my post , below is my PBI file :-
https://www.dropbox.com/s/qfb7nkqqqhxm0kx/PBT_V2021_397%20GL_TS%20SAMPLE.pbix?dl=0
Paul
@admin11 , The max date in dates between is 1-april-2021
Try this in LYTD
_LYTD_EXP =
var _max = EOMONTH(date(year(today())-1,month(today()),day(today())),-1)+1
// Rest is same
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 | |
98 | |
77 | |
66 | |
54 |
User | Count |
---|---|
144 | |
104 | |
100 | |
86 | |
64 |