Forum Discussion
How to modify expression when not select date it display LYTD = 448.69M ?
Hi All & Ashish_Mathur
_LYTD EXP_V1 :
when Not press 2021 Feb return full year sales 1.91bn is wrong. it should return Jan-Feb 2021 amount ,
when i select Feb 2021 it display 488.69M is correct..
when i select Jan 2021 it display 376.43M is correct..
when i not select any date , How to make it display 448.69M ?
_LYTD EXP V2 = CALCULATE([AMOUNT],GL[1_EXP]="EXP",DATESBETWEEN('Date'[Date],date(year(today())-1,1,1),eomonth(today(),-13)+1))
_LYTD EXP V2 :
when not select ant date , it display 488.69M is correct , when select 2021 Jan it display 488.69M is wrong.
Above link is my PBI file
Paul
4 Replies
- Ashish_Mathur
Super User
Does this measure work
_LYTD EXP V2 = CALCULATE([AMOUNT],GL[1_EXP]="EXP",DATESBETWEEN('Date'[Date],date(COALESCE([Selected year],year(today())-1),1,1),if(ISBLANK([Selected year]),eomonth(today(),-13)+1,date([Selected year],12,31))))
- admin11
Memorable Member
Thank you for your help. i get error on Selected Year :-
I try to modify :-
Change Selected Year to Year , it does not work.
Paul
- Ashish_Mathur
Super User
Selected Year is a measure
=selectedvalue(date[year])
- admin11
Memorable Member
Your expression work fine when i dont select year and month , but it does not show correct value when i select 2021 Jan or Feb.
Above is my PBI file :-
Paul
Paul