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

Compete to become Power BI Data Viz World Champion! First round ends August 18th. Get started.

Reply
Yumikang
Helper II
Helper II

How do you think of adjacent times as once?

Hi all,

I recently had a hard time.I need some help.

Use the count function to find that the time that is a few seconds apart is counted separately when counting the number of times.But for me, within a minute, they can be counted as one.

Yumikang_0-1721976003900.png

How do I design a measure?I can't use the count function and the count rows function to achieve satisfactory results.

 

2 ACCEPTED SOLUTIONS
FreemanZ
Super User
Super User

hi @Yumikang ,

 

try like:

 

Count = 
COUNTROWS(
    SUMMARIZE(
        ADDCOLUMNS(
            data,
            "time2", FORMAT([entry time], "yyyy-mm-dd hh:mm")
        ),
        [time2]
    )
)

 

 

It return 3 with such data:

FreemanZ_0-1721980099090.png

 

View solution in original post

SachinNandanwar
Super User
Super User

Incase if you want to show the number of time instances occuring over an interval of a minute you can create a caulctated column that formats the datetime to "yyyy-dd-dd hh:mm"

Ft_Time = FORMAT('Table'[Time], "yyyy-MM-dd HH:mm")

and then summarize the table 

MinuteCount = 
    SUMMARIZECOLUMNS(            
            'Table'[Ft_Time],
            "Count",COUNT('1Table'[Ft_Time])
        
    )

 

SachinNandanwar_0-1721997106510.png

Data >>
Time
2024-07-24 15:00:46
2024-07-24 15:00:46
2024-07-24 15:00:56
2024-07-24 06:49:13
2024-07-24 14:50:58
2024-07-24 16:47:33
2024-07-24 16:47:25

 



Regards,
Sachin
Check out my Blog

View solution in original post

2 REPLIES 2
SachinNandanwar
Super User
Super User

Incase if you want to show the number of time instances occuring over an interval of a minute you can create a caulctated column that formats the datetime to "yyyy-dd-dd hh:mm"

Ft_Time = FORMAT('Table'[Time], "yyyy-MM-dd HH:mm")

and then summarize the table 

MinuteCount = 
    SUMMARIZECOLUMNS(            
            'Table'[Ft_Time],
            "Count",COUNT('1Table'[Ft_Time])
        
    )

 

SachinNandanwar_0-1721997106510.png

Data >>
Time
2024-07-24 15:00:46
2024-07-24 15:00:46
2024-07-24 15:00:56
2024-07-24 06:49:13
2024-07-24 14:50:58
2024-07-24 16:47:33
2024-07-24 16:47:25

 



Regards,
Sachin
Check out my Blog
FreemanZ
Super User
Super User

hi @Yumikang ,

 

try like:

 

Count = 
COUNTROWS(
    SUMMARIZE(
        ADDCOLUMNS(
            data,
            "time2", FORMAT([entry time], "yyyy-mm-dd hh:mm")
        ),
        [time2]
    )
)

 

 

It return 3 with such data:

FreemanZ_0-1721980099090.png

 

Helpful resources

Announcements
August Power BI Update Carousel

Power BI Monthly Update - August 2025

Check out the August 2025 Power BI update to learn about new features.

August 2025 community update carousel

Fabric Community Update - August 2025

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