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.
Hello Guys,
I want to calculate the count of Ip address repeated between the createion date and 90 days ago this creation date
plz help me how to calculate
Ip Creation Date creation date 90 days ago
10.10.122.10 1/1/2021 3/10/2020
12.12.199.10 4/1/2021 6/10/2021
10.10.122.10 1/1/2021 3/10/2021
13.12.12.10 1/1/2021 3/10/2020
result should be
count
1
1
2
1
Thanks
Pra137
Solved! Go to Solution.
Hi @Anonymous
Try this code to create a calculated column.
Count =
CALCULATE (
COUNTROWS ( 'Sample' ),
FILTER (
'Sample',
AND (
'Sample'[Ip] = EARLIER ( 'Sample'[Ip] ),
'Sample'[creation date 90 days ago]
<= EARLIER ( 'Sample'[creation date 90 days ago] )
)
)
)
Result is as below.
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.
@Anonymous , a new column
New colume =
var _dt1 = [Creation Date] - 90
var _dt2 = [Creation Date] + 90
return
countx(filter(Table, [Creation Date] >=_dt1 && [Creation Date] <=_dt2), [ip])
It show me the total count of Ip address in column like 1999 for all rows i want to see 1,2,3 count of ip
Hi @Anonymous
Try this code to create a calculated column.
Count =
CALCULATE (
COUNTROWS ( 'Sample' ),
FILTER (
'Sample',
AND (
'Sample'[Ip] = EARLIER ( 'Sample'[Ip] ),
'Sample'[creation date 90 days ago]
<= EARLIER ( 'Sample'[creation date 90 days ago] )
)
)
)
Result is as below.
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.
User | Count |
---|---|
86 | |
84 | |
36 | |
34 | |
34 |
User | Count |
---|---|
93 | |
79 | |
66 | |
55 | |
52 |