Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
5 years ago
Solved

Percentage per Month

calculation does not match.
I am using the following formula as a measure in both views.

 

1 = DIVIDE(sum(hosts[cpuUtilization]),CALCULATE(sum(hosts[cpuUtilization]),ALLEXCEPT(hosts,hosts[Mes]) ))
 

  • Hi Anonymous 

     

    Try this measure:

    Total = CALCULATE ( COUNTROWS ( hosts ), ALL ( hosts ), hosts[status] = 1 )

     

    Jing

4 Replies

  • v-jingzhang's avatar
    v-jingzhang
    Icon for Community Support rankCommunity Support

    Hi Anonymous 

     

    Can you provide more details about your expected output? What is the numerator to be divided, the cpuUtilization value on each row? And what is the denominator, all cpuUtilization of all hosts in a month?

     

    And when you put a measure's formula in a calculated column, its result is different from that in a visual because their evaluation context is different. So let us know more about the expected result. And you want a measure or a calculated column?

     

    Regards,
    Community Support Team _ Jing

  • Anonymous's avatar
    Anonymous
    Not applicable

    I'm sorry my friends for the bad explanation.
    v-jingzhang  and daxer-almighty 

    Currently I have the following situation with the number of the month the percentage of the month and how many times it has run annually.
    in this column that ran annually I only count the running status = 1.

    When I put the Month Number filter, it separates by month and I need the total amount, in this case 424 and not the amount per month.

    hosts is my table
    Percent Per Month = ((hosts[2]*100)/424)/100 (this value in bold is what I need to make a formula to always appear it)

    Running Year = CALCULATE(COUNTROWS(hosts),hosts[status]=1)

    I need to get the total running value regardless if period or date filter is selected.


    I believe that by assembling this image below it would work.

    • v-jingzhang's avatar
      v-jingzhang
      Icon for Community Support rankCommunity Support

      Hi Anonymous 

       

      Try this measure:

      Total = CALCULATE ( COUNTROWS ( hosts ), ALL ( hosts ), hosts[status] = 1 )

       

      Jing