Forum Discussion

lalasisi's avatar
lalasisi
Cloud Apps
08-29-2024
Solved

How to create an average line in a bar chart?

I'm trying to create a dynamic average line in a bar chart on Sisense (orange line). My sample data looks like the below. Is there a way for Sisense to calculate the average of all teams by defa...
  • Angelina_QBeeQ's avatar
    08-29-2024

    Hi lalasisi ,


    You can add aggregation by teams like in the formula: 

    AVG([Condition],sum([Quantity]))

    Just take you base formula (sum([Quantity]) - in my case) and put it inside AVG([Condition],formula). 
    And replace [Condition] with the column with teams.

    More about aggregation you can find here: https://docs.sisense.com/main/SisenseLinux/build-formulas.htm

    Always here to help,
    Angelina from QBeeQ
    angelina.bulgakova@qbeeq.io
    QBeeQ - Gold Implementation and Development Partner

     

  • lalasisi's avatar
    lalasisi
    08-29-2024

    Thanks for your reply! It's in the right direction but the formula you shown isn't correct. I followed the documentation to create the correct formula and it worked now.