WoW Comparison BeastMode

I'm trying to make a card that will show me revenue that has been newly parked (week over week). Our data captures snapshots each week of the data so we can compare if there are changes week to week. This is the BeastMode we thought would work but it's not working properly:

Case WHEN (Snapshot Week Rank = 1 and Status/Stage != 'Parked Revenue') and (Snapshot Week Rank = 0 and Status/Stage = 'Parked Revenue') then 'Newly Parked' END

Are there any suggestions how to make this function properly or another Beastmode that would work better?

Answers

  • In your Beast Mode, your condition has Snapshot Week Rank = 1 AND Snapshot Week Rank = 0, which cannot both be true at the same. The same is happening to the Status/Stage condition. For week over week, you can use a Period Over Period chart type, change the graph by period to week, and compare week over week. Alternatively, if you are trying to do it in a Beast Mode, you can use a Window or Fixed function.

    Was this comment helpful? Click Agree or Like below.
    Did this comment solve your problem? Accept it as the solution!

  • Okay thank you. Could you help me write a new Beastmode that would work then? I've never used window or fixed function before. I want the card to only show me new programs that have been marked "parked revenue" this week compared to last week when they were not parked.

  • (CASE
    WHEN LAG(`Status/Stage`) OVER (PARTITION BY `<unique_identifier>` ORDER BY `Snapshot Date` ASC) != 'Parked Revenue' AND `Stage/Status` = 'Parked Revenue' THEN 'Yes' ELSE 'No' END)

    Add this Beast Mode as a filter, and select Yes. Make sure to replace the unique_identifier field with whatever your unique identifier is in the DataSet. Then, have the y-axis value of the chart be a count of your unique identifier column.

    Was this comment helpful? Click Agree or Like below.
    Did this comment solve your problem? Accept it as the solution!

  • I entered this formula:

    (CASE
    WHEN LAG(Status/Stage) OVER (PARTITION BY Program Name ORDER BY Snapshot Date ASC) != 'Parked Revenue'
    AND Stage/Status = 'Parked Revenue' THEN 'Yes'
    ELSE 'No'
    END)

    But I get this error: Calculation Error : A column in this calculation did not exist.

    (screenshot attached)

  • What is the date column for when your snapshot occurred called? I just put Snapshot Date as an assumption, but yours isn't called that probably.

    Was this comment helpful? Click Agree or Like below.
    Did this comment solve your problem? Accept it as the solution!

  • We do have "Snapshot Date" in the dataset

  • Oh lol, I put Status/Stage then Stage/Status. Just adjust the second reference to be Status/Stage.

    Was this comment helpful? Click Agree or Like below.
    Did this comment solve your problem? Accept it as the solution!

  • Ahh thank you! I should have caught that too. I was able to create the beast mode now. I did have to add another partition so modified the formula to this:

    (CASE
    WHEN LAG('status/stage') OVER (PARTITION BY 'Program Name','Deliverable' ORDER BY Snapshot Date ASC) != 'Parked Revenue'
    AND 'status/stage' = 'Parked Revenue' THEN 'Yes'
    ELSE 'No'
    END)

    But I parked some revenue yesterday (snapshot is taken every day) and it's not showing up as parked in my card now that I have this Beastmode entered and I filtered for not in "no" since there were no yes's to select.

  • There should be yes's to select. Sometimes with window functions you have to save the card so that the Beast Mode saves, then refresh and see if you can select them then. If they still aren't there, something else needs to be adjusted.

    Was this comment helpful? Click Agree or Like below.
    Did this comment solve your problem? Accept it as the solution!

  • I saved the card and refreshed and there are still no yes's to select. I'm not sure what else I need to adjust.

  • What is your date range filtered to? Or do you have any other filters on the card that could be filtering the values you need out?

    Was this comment helpful? Click Agree or Like below.
    Did this comment solve your problem? Accept it as the solution!

  • I don't have any other filters on the card.

  • Oh, you're using a pivot table? That might be the issue. They aggregate things a lot differently and I haven't verified this specific Beast Mode on one. Can you try using a mega table?

    Was this comment helpful? Click Agree or Like below.
    Did this comment solve your problem? Accept it as the solution!

  • I switched to Megatable and it's still not working.

  • You would have to add Billing Entity to the partition if you want to have that in the table too. But, if that doesn't work, then maybe another solution is best. You could make a column in the DataFlow to use. And maybe you already have that and I missed it. What is the Snapshot Week Rank column?

    Was this comment helpful? Click Agree or Like below.
    Did this comment solve your problem? Accept it as the solution!

  • I added 'Billing Entity' into the partition and it still didn't work. I do have 'Snapshot Week Rank' in my dataset. Where 0 is this week, 1 is last week, 2 is 2 weeks ago etc.

  • In your initial post, you said the data was snapshotted every week. But in a recent reply, you said the data was snapshotted every day. Which is it? I've been under the assumption that it was once a week, so if that isn't true, the Beast Mode would need to be updated to reflect that. There is likely a way to achieve it in the Beast Mode, but if it is every day it is probably just easier to achieve it in the DataFlow.


    What you want is to have the Status/Stage from last week be on the same row as the Status/Stage from this week. That is what I was trying to have you achieve with the window function in the Beast Mode. In the DataFlow, the best way to do that is the Rank & Window tile, but in this case it could also be achieved with a join. For Rank & Window, you'd set it up the same as the Beast Mode. But first, you need to group the data by week. You can choose to join this afterward to the original data if you still want it to be by day. Then use the Lag function on the Status/Stage column and name it something like Previous Week Status/Stage, sort by Snapshot Date or Snapshot Week Rank and partition by your other columns. Then, in a Beast Mode in the card, you just need to compare where Previous Week Status/Stage != 'Parked Revenue' and Stage/Status = 'Parked Revenue' and filter to that.

    Was this comment helpful? Click Agree or Like below.
    Did this comment solve your problem? Accept it as the solution!

  • I took another look at the data. Snapshots are taken once a week. (for example the latest snapshots were 4/26, 4/19, 4/12 etc) and then data for current day is also there. Is there a way to screenshare to walk me through this and try and figure it out together?

  • Sure, I'll DM you

    Was this comment helpful? Click Agree or Like below.
    Did this comment solve your problem? Accept it as the solution!