Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi,
I need to create year to year treand line chart, i have month, year and user ID columns. My X asis should be month and y axis should show two lines of years with count of user Id. If i select present year it should show only the present year and previous year treand. I have 2022,2021,2020,2019 year if i select 2021 it should show 2021 and 2020 year lines. Please help
HI @sharu055 ,
Please do as below.
and your expression will be as bellow.
Sum({$ <Year=,Date={"$(vCYTD)"}>+<InvoiceYear=,InvoiceDate={"$(vLYTD)"}>} Total)
Create below variables in the app.
vCYTD:
'>=' & Date(YearStart(Max(Date)), 'MM/DD/YYYY') & '<=' & Date((Max(Date)), 'MM/DD/YYYY')
vLYTD:
='>=' &
if(GetSelectedCount(Year)<=1,
Date(YearStart(Max(Date),-1), 'MM/DD/YYYY'),Date(YearStart(Max(Date),(minYear)-max(Year))), 'MM/DD/YYYY') )
& '<=' &
if(GetSelectedCount(Year)<=1,
Date(addyears(Max(Date),-1), 'MM/DD/YYYY'),Date(addyears(Max(Date),(min(Year)-max(Year))), 'MM/DD/YYYY'))