Difference between preview and data table

As you can see my data table groups by month which is want to achieve and my preview doesn't.

I've no filters or any sorting. I am probably overlooking something simple but I tried following Onyx' his tutorial (https://www.youtube.com/watch?v=cnc6gMKZ9R8) about window functions but I can't seem to group by month.

Should I add anything to my beastmodes?

For example I am using "count" instead of "sum":

lag(count(`ID`)) over( order by month (`Date`))

But I don't understand why the data table is showing me the correct way.

Thanks in advance and if you have any questions please let me know

Best Answer

  • jaeW_at_Onyx
    jaeW_at_Onyx Budapest / Portland, OR 🟤
    Accepted Answer


    in my initial comment i indicated you have to create the column "month" on the dataset (not a beast mode).

    in a similar way, you should put Month on the axis instead of using Date. if you need yearMonth, create the column yearMonth.

    Alternatively, remove date from the axis and try adding it again. Domo's UI can be weird sometimes.


  • MarkSnodgrass
    MarkSnodgrass Portland, Oregon 🟤

    In your columns, change each of your fields except for date to aggregate by SUM. This will give you one row per month.

  • jaeW_at_Onyx
    jaeW_at_Onyx Budapest / Portland, OR 🟤

    Domo broke / changed functionality in product.

    lag(count(`ID`)) over( order by month (`Date`))

    you have to add the month(`Date`) column as a real column in the dataset.

    Also be careful, laging by month(date) will lag 12,11,10,9, 8 but won't lag with respect to the year.

  • @MarkSnodgrass usually that works but now I already added "count" in my beastmode so I can't sum it. If I add it in beastmode it just crashes.

    @jaeW_at_Onyx thanks that makes sense. Too bad it still doesn't work. I think it has something to do with my date field.

    I removed all other columns and only added the "month" beastmode and my "date" field so you can see the actual values. If I remove the "date" field it will still show multiple entries per month. I can't figure out why that is.

    And I am aware of the year, thanks for the headsup but I only use the current year :)

  • jaeW_at_Onyx
    jaeW_at_Onyx Budapest / Portland, OR 🟤

    do you have Date in the Sort clause?

  • No I don't

    I added month(`Date`) and count(`ID`) as columns, that does group them by month. But when I add the lead beastmode lag(count(`ID`)) over( order by month (`Date`)) it gives me the same problem.

    I can't figure it out as everything seem in order according to your video.

    I might create a dummy dataset tomorrow to make sure nothing in my dataset is causing this for some reason.

  • Okay I created a dummy data set and it is giving me the same problems.

    If I add the following beastmode as a column: lag(sum(`Quantity`)) over( order by month (`Date`)) the problem persists.

    Attached you can see my data and my data preview. If I set "graph by" to "month" it doesn't make a difference.

    If I remove "LAG" it does work fine so my guess is that something is missing in my beastmode. A group by month call or something. Sadly I'm still a novice so I have no idea how to make that work😅