How to build acard to show breakdown of revenue by Margin % on transactions

Jobur Ireland ⚪️


I would like to build a card to show how much revenue is generated by sales at different margin % bands.

Is there an easy way to accomplish this? I think I could add a column to the dataset (already over 100 columns) to categorize each transaction. Is there another way to approach this?

I have a Revenue dataset with hundreds of different product types.

Each record has the customer, product, date, sales revenue, cost, Margin & Margin % on it.

What I would like to do is display visually how much of the revenue is generated from sales from each margin band: < 25%; 25% - 50%; 50% - 75%; 75% - 100%

If we had 1m in sales in a month, you could see how much has a margin of < 25%, 25% - 50%...



PS is the slack domousergroup still open, how do I get an invite to this.

Best Answer

  • GrantSmith
    GrantSmith Indiana 🔴
    Accepted Answer

    Hi @Jobur

    You can utilize a beast mode to create buckets for your margin % the following beast mode works since it evaluates the first condition it finds to be true and exits. If you want to sort by these values you can make another beast mode with the same logic but instead of the string (75-100%) you can return a number (2) and use that in your card sort

      WHEN `margin_pct` 1 THEN '100%+'
      WHEN `margin_pct` >=.75 THEN '75-100%'
      WHEN `margin_pct` >= .50 THEN '50-75%'
      WHEN `margin_pct` >= .25 THEN '25-50%'
      ELSE '< 25%'