Building moving windows In Tableau using the window sum function

แชร์
ฝัง
  • เผยแพร่เมื่อ 25 ส.ค. 2024
  • My favorite function in tableau is the window sum function. In this video I explain why the window sum function is one of the most useful, and powerful function In Tableau.
    As an analyst, I use the window sum function in almost every dashboard I build.
    If you're looking for a way to flatten out trend graphs and remove the weekend effect, then this video is for you.
    The formula I used in the video:
    WINDOW_SUM(countd([Opportunity Id]),-[Window Range]+1,0)
    *Sorry, TH-cam wouldn't allow me to paste the entire formula, you'll just have to pause the video and copy it yourself.
    -----------------------------------------------------------------------------------------
    Subscribe to The Analyst's Playbook newsletter - analystsplaybo...

ความคิดเห็น • 4

  • @vivicawong6389
    @vivicawong6389 2 ปีที่แล้ว

    hi there, this is super helpful! i was wondering if you’d know how i could do a window sum (shown as a graph) using table across? would be great if you could advice based on your expertise!! thank you :)

    • @theanalystsplaybook
      @theanalystsplaybook  2 ปีที่แล้ว

      Hey Vivica. I'm not sure I fully understand your question. The window sum function is essentially calculated as "table across" since it takes the last X data points. Since it's a table calculation, you aren't going to be able to do any additional manipulation like running sum etc on top of it.
      If you expand on your question, I'll try and help.

  • @kasperbirkelund4347
    @kasperbirkelund4347 3 ปีที่แล้ว

    Thanks. I was just creating something like this actually. I was searching to find a solution to the first part of the graph that is not a full window range. Nice trick with the IFF function, however for my use I really need to have it filled in with the window values.
    Do you know how to do this? So the window values are not affected by the time filter you have in the Viz? So basically allowing it to aggregate further back than what you are showing.
    Cannot find a good solution to this online I think.

    • @theanalystsplaybook
      @theanalystsplaybook  2 ปีที่แล้ว

      Hey Kasper. If you want to show all your data points in the viz, then you can simply use the window_sum function on it's own without including the IIF piece.