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

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
brettg
Helper II
Helper II

Filter by repeat users

Hi All,

 

I'm trying to find a way to filter my report by repeat users.

 

As you can see in the image, I currently have a table which displays all tests, and a pie chart which displays a users lastest test between the date period on the slider.

 

The code I have in the text box is what I use to get the users latest test in the date range. Would it be possible to include in this measure a filter which only includes users that appear twice or more?

 

Thanks!

Capturepb1.JPG

2 REPLIES 2
v-yulgu-msft
Microsoft Employee
Microsoft Employee

Hi @brettg,

 

Please try this:

latestdate2 =
VAR currGrade =
    SELECTEDVALUE ( 'Sample1'[Grade] )
VAR temp =
    ADDCOLUMNS (
        SUMMARIZE (
            FILTER (
                ALLSELECTED ( 'Sample1' ),
                CALCULATE ( COUNT ( Sample1[Test Date] ), ALLEXCEPT ( Sample1, Sample1[User] ) )
                    >= 2
            ),
            'Sample1'[User],
            "LastDate", MAX ( 'Sample1'[Test Date] )
        ),
        "Grade", LOOKUPVALUE (
            'Sample1'[Grade],
            'Sample1'[User], [User],
            'Sample1'[Test Date], [LastDate]
        )
    )
RETURN
    COUNTAX ( FILTER ( temp, [Grade] = currGrade ), [User] )

1.PNG

 

Best regards,

Yuliana Gu

Community Support Team _ Yuliana Gu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Hi Yuliana,

 

Thanks for looking into this for me!

 

This measure does only include the users that have 2 or more tests. However, I don't think the user count is affected by the date slider?

 

On the image I have attached, Ben is included on the Pie chart with only 1 test in the time period. I know he has 2 tests in the whole period. Is it possible to capture the count of users between the date range, the same way MAX date is calculated?

 

Many thanks

 

Capture13333.JPG

Helpful resources

Announcements
November Power BI Update Carousel

Power BI Monthly Update - November 2025

Check out the November 2025 Power BI update to learn about new features.

Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.

Top Kudoed Authors