Charting

Charting

Displaying a Blank chart

Hi,

Is there a way to have a Chart display blank data until filtered. For example I have two charts one with products x,y,z and then the other being a blank chart. When I click on product X, I want the blank chart to display every customer. When no product is selected I want the chart to be blank. Hopefully that makes sense.

Welcome!

It looks like you're new here. Members get access to exclusive content, events, rewards, and more. Sign in or register to get started.
Sign In

Best Answers

  • Coach
    edited February 2024 Answer ✓

    Depending on your data, you could a beast mode that's like

    case when count(product) = 1 then 'Show' else 'Hide' end

    and then filter the card to "show" and it should only show data when 1 product is selected.

  • Answer ✓

    @trafalger 's solution is really elegant. I was scratching my head trying to incorporate a variable. Probably want a COUNT(DISTINCT product), though, assuming you have more than one customer row per product. Also, note, this will only work with selecting exactly one product. If you want to be able to select more than one, you might want to create a range of possible selections (exclusive of the total number of products, otherwise it won't be blank by default)

    Please 💡/💖/👍/😊 this post if you read it and found it helpful.

    Please accept the answer if it solved your problem.

Answers

  • Coach
    edited February 2024 Answer ✓

    Depending on your data, you could a beast mode that's like

    case when count(product) = 1 then 'Show' else 'Hide' end

    and then filter the card to "show" and it should only show data when 1 product is selected.

  • Answer ✓

    @trafalger 's solution is really elegant. I was scratching my head trying to incorporate a variable. Probably want a COUNT(DISTINCT product), though, assuming you have more than one customer row per product. Also, note, this will only work with selecting exactly one product. If you want to be able to select more than one, you might want to create a range of possible selections (exclusive of the total number of products, otherwise it won't be blank by default)

    Please 💡/💖/👍/😊 this post if you read it and found it helpful.

    Please accept the answer if it solved your problem.

  • Great Solution. We need it to only show one product at a time so this works amazingly. Thank you!

  • Ah good callout, I would use DISTINCT there.

Welcome!

It looks like you're new here. Members get access to exclusive content, events, rewards, and more. Sign in or register to get started.
Sign In