Forum Discussion

ghouse_peer's avatar
ghouse_peer
Icon for Post Patron rankPost Patron
3 years ago
Solved

Count with all Status and Divide by Total

Hi team,

 

I ahve a column in my dataset named "Status".

In Status column we have Completed, In Progress, Awaiting Confirmation and Blanks.

 

 Total Alerts= Sum of counts (Completed+In Progress+Awaiting Confirmation+Blanks.)

Sum= (Completed+In Progress)

 

Calculation: Sum/Total Alerts.

 

Kindly help me with the solution.

 

Thanks in advance

 

 

 

  • Hi   ghouse_peer 

    try like:

    Ratio =
    VAR _value = CALCULATE(COUNTROWS(TableName), TableName[Status] IN {"Completed", "In Progress"})
    VAR _allvalue = CALCULATE(COUNTROWS(TableName), ALL(TableName))
    RETURN 
    DIVIDE(_value, _allvalue)

2 Replies

  • Hi   ghouse_peer 

    try like:

    Ratio =
    VAR _value = CALCULATE(COUNTROWS(TableName), TableName[Status] IN {"Completed", "In Progress"})
    VAR _allvalue = CALCULATE(COUNTROWS(TableName), ALL(TableName))
    RETURN 
    DIVIDE(_value, _allvalue)