Rolling 7 day over 7 day count and sum up down or same

  • Rolling 7 day over 7 day count and sum up down or same

    Posted by DSC Communities on April 14, 2020 at 5:25 am
    • Tim Dwyer

      Member

      April 14, 2020 at 5:25 AM

      I currently have a report that pulls data from different tables with different date tables. These are for open, won, and quoted Opportunities to show both the count and amount for the past 7 days. Depending upon the business unit/time zone they are scheduled to go out almost every day. I have relative date filters on the visuals for their corresponding date table.
      Ask from management, show red/yellow/green arrows comparing the previous seven days count or sum in that visual relative to the date. I have done this with conditional formatting.
      I am not sure how to write the dax to show previous 7 days over seven days before that to know whether it is up or down or even. I can’t define the day of the week since there are filters on the visuals keep it to the day and I wish I could sync that with dax. Any idea’s?
      Thank you,
      Tim

      ——————————
      Tim Dwyer
      System Admin
      Houston TX
      2817730083
      ——————————

    • David Gerard

      Member

      April 14, 2020 at 7:14 AM

      Hi ,

      It might be very difficult for one to create a good image of your model.
      It would be very helpful if you could share a sample of your model PBIX or at minimum some screenshots of the tables, the model and how your data would be represented with required filters.

      Regards?

      ——————————
      David Gerard
      Business Intelligence Consultant
      Kampala
      ——————————
      ——————————————-

    • Tim Dwyer

      Member

      April 14, 2020 at 8:21 AM

      Hi David,

      Yes, Attached is the Page level filter. Also, the 4 visuals on the page that I am trying to compare to the previous seven days.

      Power BI page level filter

      Wanting up down or neutral arrows next to all numbers

      ——————————
      Tim Dwyer
      System Admin
      HG
      Houston TX
      2817730083
      ——————————
      ——————————————-

    • Greg Philps

      Member

      April 15, 2020 at 12:44 PM

      Hi Tim. I agree that a sample file would be a great help, but I imagine something using AVERAGEX and DATESIINPERIOD might work. Here’s a quick-and-dirty sample. Hope it helps. GregHi Tim. I agree that a sample file would be a great help, but I imagine something using AVERAGEX and DATESIINPERIOD might work. Here’s a quick-and-dirty sample. Hope it helps. Greg

      1-7 Days Ago Rolling Average Sales =Ā AVERAGEX(Ā  Ā  DATESINPERIOD( Dates[Date], LASTDATE( Dates[Date]), -7, DAY ),Ā  Ā  [Total Sales]Ā  Ā  )
      8-14 Days Ago Rolling Average Sales =Ā AVERAGEX(Ā  Ā  DATESINPERIOD( Dates[Date], DATEADD( LASTDATE( Dates[Date]), -8, DAY ), -7, DAY ),Ā  Ā  [Total Sales]Ā  Ā  )
      Up or Down =Ā SWITCH( TRUE(),Ā  Ā  [1-7 Days Ago Rolling Average Sales] > [8-14 Days Ago Rolling Average Sales], “UP”,Ā  Ā  [1-7 Days Ago Rolling Average Sales] < [8-14 Days Ago Rolling Average Sales], “DOWN”,Ā  Ā  “SAME”Ā  Ā  )

      ——————————
      Greg Philps
      Power BI Consultant
      Ottawa ON Canada
      ——————————
      ——————————————-

    DSC Communities replied 5 years, 11 months ago 1 Member · 0 Replies
  • 0 Replies

Sorry, there were no replies found.

The discussion ‘Rolling 7 day over 7 day count and sum up down or same’ is closed to new replies.

Start of Discussion
0 of 0 replies June 2018
Now

Welcome to our new site!

Here you will find a wealth of information created for peopleĀ  that are on a mission to redefine business models with cloud techinologies, AI, automation, low code / no code applications, data, security & more to compete in the Acceleration Economy!