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

Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.

Reply
Anonymous
Not applicable

Dax countrows time greater than 48 hours

Hello, 

 

my goal is to show data that is older than 48 hours for the row "STBs[Settings completion time (First contact to SGIS)]".

 

i currently use the following dax calculation:

 

COUNTROWS(filter(STBs,STBs[Settings completion time (2h)] = BLANK() && STBs[Settings completion time (First contact to SGIS)] <> BLANK() && STBs[Settings completion time (First contact to SGIS)]>48
 
"STBs[Settings completion time (First contact to SGIS)]>48" does not seem to work. 

What would be the solution for this problem? 


Thank you very much. 


Kind Regards
Jannis
 
 
1 ACCEPTED SOLUTION
v-rzhou-msft
Community Support
Community Support

Hi @Anonymous ,

 

Please make sure the data formart of STBs[Settings completion time (First contact to SGIS)] column.

If it is number format as below, your code should work. 

Measure = COUNTROWS(filter(STBs,STBs[Settings completion time (2h)] = BLANK() &&  STBs[Settings completion time (First contact to SGIS)]>48))

RicoZhou_0-1663309658237.png

RicoZhou_1-1663309725586.png

If it is time format, I suggest you to use HOUR() function to get hour number.

Measure = COUNTROWS(filter(STBs,STBs[Settings completion time (2h)] = BLANK() && HOUR( STBs[Settings completion time (First contact to SGIS)])>48))

 

Best Regards,
Rico Zhou

 

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

1 REPLY 1
v-rzhou-msft
Community Support
Community Support

Hi @Anonymous ,

 

Please make sure the data formart of STBs[Settings completion time (First contact to SGIS)] column.

If it is number format as below, your code should work. 

Measure = COUNTROWS(filter(STBs,STBs[Settings completion time (2h)] = BLANK() &&  STBs[Settings completion time (First contact to SGIS)]>48))

RicoZhou_0-1663309658237.png

RicoZhou_1-1663309725586.png

If it is time format, I suggest you to use HOUR() function to get hour number.

Measure = COUNTROWS(filter(STBs,STBs[Settings completion time (2h)] = BLANK() && HOUR( STBs[Settings completion time (First contact to SGIS)])>48))

 

Best Regards,
Rico Zhou

 

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Helpful resources

Announcements
LearnSurvey

Fabric certifications survey

Certification feedback opportunity for the community.

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

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