Trying to show Churn (%) as a percentage and Churn (#) as a regular number

Basically What the title says, I'm trying to figure out what I need to add to my beast mode to be able to switch between the unit type on the axis. I want to display Churn (%) as a percentage (without multiplying by 100) and show Churn (#) as a number.

Attached is the beast mode that I have so far

Tagged:

Best Answer

  • Manasi_Panov
    Manasi_Panov Contributor
    edited August 21 Answer ✓

    Hi @miguel_bustamante,

    What about using Tooltips? As shown in the screenshot, you can toggle between different currencies (in my case) and display the selected currency directly on the chart. I can also switch between Value and Quantity. You can adapt this in your scenario to switch between units and percentages. Please take note of the Beastmode I created and added to Tooltip field 1. I hope this addresses your request.

    Currency selected as CHF:

    Currency selected as GBP:

    Here is the Variable and Beastmode I'm using:

    If you found this post helpful, please use 💡/💖/👍/😊 below! If it solved your problem, don't forget to accept the answer.

Answers

  • How about

    CASE
    WHEN `Churn Unit` = '% of Units' THEN CONCAT(ROUND(`Churn (%)`, 1), '%')
    WHEN `Churn Unit` = '# of Units' THEN ROUND(`Churn (Units)`, 0)
    END

    ROUND(Churn (%), 1): Rounds the churn percentage to one decimal place. CONCAT(ROUND(Churn (%), 1), '%'): Appends a percentage sign to the rounded percentage value to display it as a percentage. ROUND(Churn (Units), 0): Rounds the churn units to the nearest whole number.

    ** Was this post helpful? Click Agree or Like below. **
    ** Did this solve your problem? Accept it as a solution! **

  • @ArborRose This did not do anything. Is there maybe a change in my chart properties that could be causing this? Only properties I have set is Show total labels selected. and both Value Scale (y) and Category Scale (x) Titles set.

  • miguel_bustamante
    edited August 19

    @ArborRose Looking at it, the data table is showing it as a percentage, but it is not carrying over to the actual chart.

  • If you're applying this Beast Mode calculation to a chart, ensure the chart type is compatible with mixed data types, as some chart types may not handle string formatting (e.g., concatenating a %) on axis values.

    1. Beast Mode Calculation with Mixed Data Types

    • If your Beast Mode calculation returns different data types (e.g., a percentage and a whole number) depending on the conditions in your CASE statement, Domo might not automatically format the axis to correctly display both types.
    • For example, if one condition returns a percentage formatted as a string (e.g., "50%") and another returns a number (e.g., 1000), Domo might not know how to handle this mix.

    2. Setting Axis Formatting

    • Explicit Axis Formatting: In the chart settings in Domo, you can often specify how the data on an axis should be formatted. For instance, you can set the axis to treat all values as percentages, numbers, or currency.
    • Custom Number Formatting: In some cases, you might need to apply custom formatting rules to ensure that percentages appear with a % sign and numbers appear without it.

    3. How to Adjust Axis Formatting

    • Chart Properties:
      • Go to the chart properties in Domo (click on the wrench icon in the chart's top-right corner).
      • Navigate to the "Value Scale" section or "Number Formatting" section (depending on your chart type).
      • Here, you can specify whether values should be treated as numbers, percentages, currency, etc.
      • This setting can help Domo interpret the values returned by your Beast Mode calculation and display them correctly on the axis.

    ** Was this post helpful? Click Agree or Like below. **
    ** Did this solve your problem? Accept it as a solution! **

  • How do i do the custom number formating… I looked through all the value scale options and number format options, not a single one lets me control the way that the data is displayed on a case by case basis they are all explicit formating. Explicit formating is not what I need because I need them to be different, thats the whole point of this post.

    I need this to be some form of bar graph, and I currently have it set to the regular bar chart. Is there a specific chart that this works with that you can recommend? I have tried them all and none work. please let me know.

  • I don't know a specific chart type if custom formatting isn't available. I don't know all the options without trying to replicate the entire thing myself and see what's available. My approach would be to start creating some kind of custom output using a brick or possibly try to work with separate charts in a dashboard layout. One for Churn (%) and another for Churn (#).

    ** Was this post helpful? Click Agree or Like below. **
    ** Did this solve your problem? Accept it as a solution! **

  • I just made it into two charts, but was really hoping to find a way to do just one. DOMO should really implement a way to due this naturally. Such a handicap to beastmodes that this cant be done.

  • Manasi_Panov
    Manasi_Panov Contributor
    edited August 21 Answer ✓

    Hi @miguel_bustamante,

    What about using Tooltips? As shown in the screenshot, you can toggle between different currencies (in my case) and display the selected currency directly on the chart. I can also switch between Value and Quantity. You can adapt this in your scenario to switch between units and percentages. Please take note of the Beastmode I created and added to Tooltip field 1. I hope this addresses your request.

    Currency selected as CHF:

    Currency selected as GBP:

    Here is the Variable and Beastmode I'm using:

    If you found this post helpful, please use 💡/💖/👍/😊 below! If it solved your problem, don't forget to accept the answer.

  • this is awesome thank you so much