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

Earn the coveted Fabric Analytics Engineer certification. 100% off your exam for a limited time only!

Reply
Anonymous
Not applicable

Filter by checkin

What i want is the users that made more than 1 checkIn in the same day. 

Is that posssible? thanks 🙂 
This will be better with a new table 

Original data:

userplacedate
1A01/01/2020 11:53
1B01/01/2020 13:33
1C03/01/2020 00:53
2A01/01/2020 09:53
2C01/01/2020 10:30
3A01/01/2020 11:53
3B02/01/2020 11:53
3C03/01/2020 11:53
3D04/01/2020 11:53

 

Result: 

userplacedate
1A01/01/2020 11:53
1B01/01/2020 13:33
2A01/01/2020 09:53
2C01/01/2020 10:30

 

1 ACCEPTED SOLUTION
v-rzhou-msft
Community Support
Community Support

Hello @LuisELopez

You can test my way of using dax to create a new calculated table.

I build a table like yours, to get tested.

1.png

Calculated table:

Table2 = 
VAR _T1 =
    ADDCOLUMNS ( Table1, "Date2", FORMAT ( Table1[date], "dd/mm/yyyy" ) )
VAR _T2 =
    ADDCOLUMNS (
        _T1,
        "Count1",
            COUNTAX (
                FILTER ( _T1, [user] = EARLIER ( [user] ) && [Date2] = EARLIER ( [Date2] ) ),
                [Date2]
            )
    )
RETURN
    SUMMARIZE ( FILTER ( _T2, [Count1] > 1 ), [user], [place], [date] )

Result:

2.png

Best regards

Rico Zhou

If this post helps,then consider Accepting it as the solution to help other members find it faster.

View solution in original post

3 REPLIES 3
v-rzhou-msft
Community Support
Community Support

Hello @LuisELopez

You can test my way of using dax to create a new calculated table.

I build a table like yours, to get tested.

1.png

Calculated table:

Table2 = 
VAR _T1 =
    ADDCOLUMNS ( Table1, "Date2", FORMAT ( Table1[date], "dd/mm/yyyy" ) )
VAR _T2 =
    ADDCOLUMNS (
        _T1,
        "Count1",
            COUNTAX (
                FILTER ( _T1, [user] = EARLIER ( [user] ) && [Date2] = EARLIER ( [Date2] ) ),
                [Date2]
            )
    )
RETURN
    SUMMARIZE ( FILTER ( _T2, [Count1] > 1 ), [user], [place], [date] )

Result:

2.png

Best regards

Rico Zhou

If this post helps,then consider Accepting it as the solution to help other members find it faster.

amitchandak
Super User
Super User

@Anonymous , Create a solution both as a column, that you can use.

As a measure used in visual.

Please find the file after the signature

Fowmy
Super User
Super User

@Anonymous 

If you want to it in power query, follow these 3 steps

Add Column > Custom Column: 

 

[user] &"|"& Text.From(DateTime.Date([date]))

 

 

Go to Home Tab and click keep rows > Keep Duplicates

Fowmy_0-1600802752287.png


Full Code that you can paste in a blank query and check the steps

let
    Source = Table.FromRows(Json.Document(Binary.Decompress(Binary.FromText("i45WKi1OLVLSUSrISUxOBdIpiSWpSrE60UqGQI4jEBsY6gORkYGRgYKhoZWpMVzSCU3S2MoYIekMkjSGSxoYwHQaYRprYIks6YxmrIGVsQFY0hifg4xhDjLCIYnmIFRJF5CkCbpkLAA=", BinaryEncoding.Base64), Compression.Deflate)), let _t = ((type nullable text) meta [Serialized.Text = true]) in type table [#"(blank)" = _t, #"(blank).1" = _t, #"(blank).2" = _t]),
    #"Promoted Headers" = Table.PromoteHeaders(Source, [PromoteAllScalars=true]),
    #"Changed Type" = Table.TransformColumnTypes(#"Promoted Headers",{{"date", type datetime}}, "en-gb"),
    #"Added Custom" = Table.AddColumn(#"Changed Type", "Custom", each [user] &"|"& Text.From(DateTime.Date([date]))),
    #"Kept Duplicates" = let columnNames = {"Custom"}, addCount = Table.Group(#"Added Custom", columnNames, {{"Count", Table.RowCount, type number}}), selectDuplicates = Table.SelectRows(addCount, each [Count] > 1), removeCount = Table.RemoveColumns(selectDuplicates, "Count") in Table.Join(#"Added Custom", columnNames, removeCount, columnNames, JoinKind.Inner),
    #"Removed Columns" = Table.RemoveColumns(#"Kept Duplicates",{"Custom"})
in
    #"Removed Columns"


Let me know if you need in DAX

________________________

If my answer was helpful, please consider Accept it as the solution to help the other members find it

Click on the Thumbs-Up icon if you like this reply 🙂

YouTube  LinkedIn

 

Did I answer your question? Mark my post as a solution! and hit thumbs up


Subscribe and learn Power BI from these videos

Website LinkedIn PBI User Group

Helpful resources

Announcements
April AMA free

Microsoft Fabric AMA Livestream

Join us Tuesday, April 09, 9:00 – 10:00 AM PST for a live, expert-led Q&A session on all things Microsoft Fabric!

March Fabric Community Update

Fabric Community Update - March 2024

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