Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Don't miss out! 2025 Microsoft Fabric Community Conference, March 31 - April 2, Las Vegas, Nevada. Use code MSCUST for a $150 discount. Prices go up February 11th. Register now.

Reply
rigginb
Frequent 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.

 

received to assign.png

1 ACCEPTED SOLUTION
Walter_W2022
Resolver II
Resolver 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)
RETURN
divide(_countgreatthan60,_total_row_count)

wangbt89_1-1680322284729.png

 

 

View solution in original post

1 REPLY 1
Walter_W2022
Resolver II
Resolver 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)
RETURN
divide(_countgreatthan60,_total_row_count)

wangbt89_1-1680322284729.png

 

 

Helpful resources

Announcements
Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount! Prices go up Feb. 11th.

Feb2025 Sticker Challenge

Join our Community Sticker Challenge 2025

If you love stickers, then you will definitely want to check out our Community Sticker Challenge!

Jan25PBI_Carousel

Power BI Monthly Update - January 2025

Check out the January 2025 Power BI update to learn about new features in Reporting, Modeling, and Data Connectivity.

Jan NL Carousel

Fabric Community Update - January 2025

Find out what's new and trending in the Fabric community.