Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
How to get the date from previous year and use in a measure? I have a date picker which date is from this year, when I select atleast 1 date (ex. Feb 1, 2024 then I should get the date from last year which is Feb 1, 2023) but how about if I select more than 1 date, how can I get the value of that from the date last year? I'm using GetFieldSelections and I can get the selected date value from this year. Ex. 2/2/2024, 2/3/2024
If I figure out what you want, you could try with AddYears function with -1 as argument:
Does this solution work for you?
S.
Try below
Result
Regards,
Prashant Sangle
Hi,
can you please send a sample of the desired situation? Which kind of formula do you want to use?
S.
It should be like this. If I select multiple dates then I should get the same date from previous year so that I can get the growth based on the selected date.
Sample selected date: Feb 1, 2024 and Feb 2, 2024
The value in function GetFieldSelections is 2/1/2024, 2/2/2024 (contains comma). How can I get the date from last year based on the selected current date?
Attached sample below.
If I figure out what you want, you could try with AddYears function with -1 as argument:
Does this solution work for you?
S.
Yes, thank you! This could work but I need to put the AddYears value in a measure. Like Sum(This Year) Sales - Sum(AddYears value) Sales. any better approach?
Try below
Result
Regards,
Prashant Sangle
Thank you! Tried using and actually works.