Forum Discussion

ReutAtias12's avatar
ReutAtias12
Frequent Visitor
3 years ago
Solved

Count total client base on condition

Hi All,

 

I'm trying to count the amount of times a client login with the same user

and then count the total client that had only one user in three months 

 

client idlogin dateuser
117/11/22A
116/11/22B
115/11/22A
217/11/22C
216/11/22

j

307/10/22

Z

 

i tried to use sumarize but it didnt work

pls help 🙂

  • Hi,

    I am not sure how your datamodel looks like, or how your desired outcome of the visualizations look like, but please try something like below and the attached pbix file.

     

     

    Expected result measure: =
    COUNTROWS (
        FILTER (
            ADDCOLUMNS (
                DISTINCT ( Data[client id] ),
                "@countusers", CALCULATE ( COUNTROWS ( DISTINCT ( Data[user] ) ) )
            ),
            [@countusers] = 1
        )
    )
    

2 Replies

  • Hi,

    I am not sure how your datamodel looks like, or how your desired outcome of the visualizations look like, but please try something like below and the attached pbix file.

     

     

    Expected result measure: =
    COUNTROWS (
        FILTER (
            ADDCOLUMNS (
                DISTINCT ( Data[client id] ),
                "@countusers", CALCULATE ( COUNTROWS ( DISTINCT ( Data[user] ) ) )
            ),
            [@countusers] = 1
        )
    )