Forum Discussion

madzgalj_darko's avatar
madzgalj_darko
Frequent Visitor
3 years ago
Solved

First transaction for each user for each day

Hello everyone, I was searching all around for DAX for my situation. Hope someone here can help me So basically i have a table with thousands transactions per day, I need a DAX that is gonna give m...
  • FreemanZ's avatar
    FreemanZ
    3 years ago

    hi madzgalj_darko 

    Supposing you have a table like:

    user_idamountcreated_at
    A15/4/2023 10:01
    A25/4/2023 10:02
    A35/4/2023 10:03
    B115/4/2023 10:01
    B225/4/2023 10:02
    B335/4/2023 10:03

     

    try like:
    1)add a calculated column like:

     

    date = DATEVALUE([created_at])

     

    2)plot a table visual with user_id and date columns with a measure like:

     

    DailyFirstAmt = 
    MINX(
        TOPN(
            1,
            data,
            data[created_at],
            1
        ),
        data[amount]
    )

     

    it worked like: