Forum Discussion
rigginb
3 years agoFrequent Visitor
Help with command
Hello,
I need a command for the following column that will show the percentage of cells higher than 00:00:60 (60 seconds). I appreciate any help.
rigginb , you need to convert to seconds first, then using below measure to calculate, not sure whether my understanding is correct or not, please let me know.
I created below example for 21 rows and 4 out of 21 are greater than 60, that's why 4/21 = 19%_percentage =VAR _table = ADDCOLUMNS(Sheet1,"@greatthan60",IF(CALCULATE(sum(Sheet1[Total seconds]))>60,1,0))VAR _countgreatthan60 = SUMX(_table,[@greatthan60])VAR _total_row_count = COUNTROWS(Sheet1)RETURNdivide(_countgreatthan60,_total_row_count)
1 Reply
- Walter_W2022Resolver II
rigginb , you need to convert to seconds first, then using below measure to calculate, not sure whether my understanding is correct or not, please let me know.
I created below example for 21 rows and 4 out of 21 are greater than 60, that's why 4/21 = 19%_percentage =VAR _table = ADDCOLUMNS(Sheet1,"@greatthan60",IF(CALCULATE(sum(Sheet1[Total seconds]))>60,1,0))VAR _countgreatthan60 = SUMX(_table,[@greatthan60])VAR _total_row_count = COUNTROWS(Sheet1)RETURNdivide(_countgreatthan60,_total_row_count)