Progress Bar Gauge visuals

Hedger
Hedger ⚪️
edited November 2021 in Card Building

Is there any way to change the visuals of the Progress Bar Gauge?

I want to display my data as a percentage but would like to use the visuals of the Filled Gauge rather than the Progress Bar Gauge. I attempted to create my card using the Filled Gauge option but it seems to only show whole numerical values rather than percentages.

Best Answer

  • GrantSmith
    GrantSmith Indiana 🥷
    Answer ✓

    Case statements are helpful in situations like this where you want to conditionally add things together.

    SUM(CASE WHEN `IsRead` = 'True' THEN 1 ELSE 0 END) / COUNT(`Username`)
    

    Essentially we're saying give me a 1 if IsRead is True otherwise give me a 0 and then adding all the values together.

    This should allow you to calculate your percentage without having to process it through an ETL and stripping out the False values.

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

Answers

  • GrantSmith
    GrantSmith Indiana 🥷

    Hi @Hedger

    Have you tried formatting your column as a percentage in the Filled Gauge card column properties?


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

    Yes I tried that but it just changed the numerical value from 1220 to 1220% out of 1750%


    Data wise the Progress Bar converts the values perfectly to the percentages it just looks a bit boring

  • GrantSmith
    GrantSmith Indiana 🥷

    Ah, so your data isn't a percentage but an actual number. Have you tried using a beast mode to calculate your percentage and use that as your value? Your target would need to be a percentage value as well so they're on the same scale.

    I don't know the fields you're using but a simple beast mode like the following should work (just change your numerator to be the column which identifies where you are and the denominator to be where you need to be):

    SUM(`Available`) / SUM(`Total`)
    
    **Was this post helpful? Click Agree or Like below**
    **Did this solve your problem? Accept it as a solution!**
  • GrantSmith
    GrantSmith Indiana 🥷

    You can also just set the target value under your chart properties: General > Target Value. If you're wanting 100% use 1.

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

    It may be a little more complicated than that


    Both the columns I am working with are text columns. One is named IsRead and contains True or False the other columns contains unique usernames.


    I attempted to use a Beast Mode to count the total True statements and ignore the False statements but I'm fairly new to Domo and Beast Mode so couldn't get this to work so instead I removed the False statements from InRead so they were blank in the ETL. I then did a count of for that column so it totaled the True statements then did a Count of the Username column for the Max Value to get the total number of users. This calculated the percentages correctly


    If there is a way to recreate this using Beast Mode in the Filled Gauge that would be perfect but I just don't have the knowledge of Beast Mode statements to pull it off.

  • Thanks @GrantSmith that seems to have worked


    I wasn't far off with the Beast Mode statement. Just missed the / COUNT(`UserName`) at the end.


    Thanks for all your help.