The ultimate Fabric, Power BI, SQL, and AI community-led learning event. Save €200 with code FABCOMM.
Get registeredCompete to become Power BI Data Viz World Champion! First round ends August 18th. Get started.
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.
How do I design a measure?I can't use the count function and the count rows function to achieve satisfactory results.
Solved! Go to Solution.
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:
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])
)
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
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])
)
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
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:
User | Count |
---|---|
16 | |
8 | |
7 | |
6 | |
6 |
User | Count |
---|---|
25 | |
13 | |
12 | |
8 | |
8 |