Skip to main content

Hi,

 

1)I need to show data previous Every month first- and second-day data and last two days data.

 

2)Current month first- and second-day data and current day data I need.

 

I have done manually but i need dynamically.

 

Please help me.

1 answer
  1. Mar 12, 2023, 8:09 PM

    You can use the following to get the values:

    IF [Order Date]<=DATEADD('day',1,(DATETRUNC('month',[Order Date])))

    OR DATEPART('day',[Order Date])>=DATEPART('day',DATEADD('day',2,[Order Date])) THEN [Sales]

    ELSEIF [Order Date]=TODAY() THEN [Sales]

    END

    You can use the following to get the values:IF [Order Date]<=DATEADD('day',1,(DATETRUNC('month',[Order Date]))) OR DATEPART('day',[Order Date])>=DATEPART('day',DATEADD('day',2,[Order Date])) THEN [SalIf you also need that to be a filter to display just those values you could use the following on the Filters Card:

    [Order Date]<=DATEADD('day',1,(DATETRUNC('month',[Order Date])))

    OR DATEPART('day',[Order Date])>=DATEPART('day',DATEADD('day',2,[Order Date]))

    OR[Order Date]=TODAY()

    Set to TRUE:

    Screen

     

    Best, Don

    (Please, don't forget to click Select as Best or Upvote !)

0/9000