Beast Mode to remove values based on card selection?

Good afternoon,


Is there a Beast Mode that can be written to exclude certain values from the broader data set based upon the option an end user selects on a page?

Example: users can either choose AM or PM on my dashboard., which then alters the data on the rest of the page based on which they selected (the default is no selection, which is then an all day aggregation).


However, I found that when the user selects PM, some erroneous rows appear (which need to be there for the default view but NOT for the PM view).

Is there a Beast Mode that could be written that says, "When User selects PM, filter out "Breakfast Specials" ?"

Or does this need to be corrected further up in the data?

Thank you!

-Joe

Tagged:

Best Answers

  • jaeW_at_Onyx
    jaeW_at_Onyx Coach
    Answer ✓

    @Joe_M if your table_cards and your filter_cards are built off the same dataset, then the filter cards will update based on the available data.

    in other words.

    if you have two filter cards [foods] and [time_slot] and you select time_slot = afternoon, the list of dishes available will be filtered by [times_slot] = afternoon.

    if pancakes appear in your [foods] card with afternoon selected, it implies that someone sold pancakes in the afternoon.

    what you can do is alter your data so that you have [food_time_slot] and [actual_time_slot] on your table.

    that way if some weirdo orders pancakes in the afternoon slot, the [food_time_slot] would be 'morning' because it's from the morning menue and then [actual_time_slot] would be 'afternoon' because that's when the meal was ordered.

    then as you construct sum(actual) sales, it still tells the truth when you filter on [actual_time_slot] but if you had a column beast mode

    sum(case when actual_time_slot = food_time_slot then actual), when you click [actual_time_slot] = afternoon then you'd only return food sold in the afternoon from the lunchtime menu.

    Jae Wilson
    Check out my 🎥 Domo Training YouTube Channel 👨‍💻

    **Say "Thanks" by clicking the ❤️ in the post that helped you.
    **Please mark the post that solves your problem by clicking on "Accept as Solution"
  • Joe_M
    Joe_M Member
    Answer ✓

    Thanks Jae - for the answer and for continuing my food metaphor. I'm going to give this a shot.

Answers

  • Jae Wilson
    Check out my 🎥 Domo Training YouTube Channel 👨‍💻

    **Say "Thanks" by clicking the ❤️ in the post that helped you.
    **Please mark the post that solves your problem by clicking on "Accept as Solution"
  • Joe_M
    Joe_M Member

    Almost, but not quite. For example, this dashboard in question is about my 24 hour restaurant. I have dashboard users who want to understand which dishes get ordered off of our Morning menu and which get ordered off of our Evening menu. The dashboard has a slicer with options for Morning and Evening, though the page defaults to both when a user visits the page.

    The problem I'm running into is that Pancakes, which I only serve in the Morning, are appearing in the data when only Night is selected. I can't filter Pancakes out of the data set, because it's an important part of the Morning sales data. I also can't trust that the end-user will choose to de-select Pancakes from a Slicer or Radio Button when trying to see which meals were sold during the Evening.

    So it feels like there should be a Case statement that I can write that says, essentially "When Night is chosen then don't include Pancakes".

    Did that make it any clearer?

  • jaeW_at_Onyx
    jaeW_at_Onyx Coach
    Answer ✓

    @Joe_M if your table_cards and your filter_cards are built off the same dataset, then the filter cards will update based on the available data.

    in other words.

    if you have two filter cards [foods] and [time_slot] and you select time_slot = afternoon, the list of dishes available will be filtered by [times_slot] = afternoon.

    if pancakes appear in your [foods] card with afternoon selected, it implies that someone sold pancakes in the afternoon.

    what you can do is alter your data so that you have [food_time_slot] and [actual_time_slot] on your table.

    that way if some weirdo orders pancakes in the afternoon slot, the [food_time_slot] would be 'morning' because it's from the morning menue and then [actual_time_slot] would be 'afternoon' because that's when the meal was ordered.

    then as you construct sum(actual) sales, it still tells the truth when you filter on [actual_time_slot] but if you had a column beast mode

    sum(case when actual_time_slot = food_time_slot then actual), when you click [actual_time_slot] = afternoon then you'd only return food sold in the afternoon from the lunchtime menu.

    Jae Wilson
    Check out my 🎥 Domo Training YouTube Channel 👨‍💻

    **Say "Thanks" by clicking the ❤️ in the post that helped you.
    **Please mark the post that solves your problem by clicking on "Accept as Solution"
  • Joe_M
    Joe_M Member
    Answer ✓

    Thanks Jae - for the answer and for continuing my food metaphor. I'm going to give this a shot.