Forum Discussion

mfarref's avatar
mfarref
New Member
3 years ago

KPI (number) based on a bar chart

Hello,

 

I'm new to PowerBI and I can't find a way to generate a KPI (that is a number) based on a bar chart.

 

My chart is:

 

(If you need translation from catalan, ask and I will translate anything you need)

 

I want to create a KPI that returns the number of column with a value below a threshold. I've been able to color the columns differently based on this threshold, but I can't generate a separate KPI.

 

Thanks in advance!

3 Replies

  • You could create a measure, similar to how you probably coloured in the bars.

     

    LessThan3 = CALCULATE(COUNTROWS('Table'),'Table'[Amount]< 3)

     

     

     

    • mfarref's avatar
      mfarref
      New Member

      The value of the columns is an average of a column from the table per day. How would that work? I don't now if this is a very basic question, but I'm really new in PowerBI

  • Is value you are using in your barchart from column or a measure?

     

    If it is a measure, then you can count the number of days the average is less than your threshold. 

     

    SUMX(VALUES('Date'[Day]), INT(CALCULATE([Mediana de Temps buit] < 3)))