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

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

Reply
IF
Post Prodigy
Post Prodigy

Recent file and not showing the repeated values

Hi,

 

I have such data:

KetIDStIDTypeIDTypeLevelYesNoDateRecentLevel
K1223a3221Yes7/14/20211
K1223a3221No6/14/20210
K1223a3333Yes7/14/20211
K1223a3333No6/14/20210
K1223a3333Yes7/14/20211
K1223a4442Yes6/11/20210
K1223a4442No7/11/20211
K1222a73a1Yes6/11/20211
K1222a73a1Yes7/11/20211
K1222a63a2Yes3/11/20211
K1222a63a2Yes5/11/20211
K1323a3221No7/14/20211
K1323a3221No6/14/20211
K1323a3333Yes7/14/20210
K1323a3333No6/14/20211
K1323a3333NA7/14/20212
K1323a4442No3/11/20210
K1323a4442Yes7/11/20211
K1322a73a1Yes6/11/20211
K1322a73a1Yes7/11/20211
K1322a63a2No3/11/20210
K1322a63a2Yes5/11/20211

 

I use KetID as slicer.

 I want to see the most recent TypeID by looking at the date. If there is a repeated value (which is always the same), I want to see only one of them. 

If I select K12, the result should be:

KetIDStIDTypeIDTypeLevelYesNoDateRecentLevel
K1223a3221Yes7/14/20211
K1223a3333Yes7/14/20211
K1223a4442No7/11/20211
K1222a73a1Yes7/11/20211
K1222a63a2Yes5/11/20211

 

If I select K13, the result should be:

KetIDStIDTypeIDTypeLevelYesNoDateRecentLevel
K1323a3221No7/14/20211
K1323a3333NA7/14/20212
K1323a4442Yes7/11/20211
K1322a73a1Yes7/11/20211
K1322a63a2Yes5/11/20211

 

Thanks in advance!

1 ACCEPTED SOLUTION
Anonymous
Not applicable

Hi @IF ,

 

Create the following measure and put it into Filters, set show items when the value is 1.

Measure =
VAR _date =
    CALCULATE (
        MAX ( 'Table'[Date] ),
        FILTER ( ALLSELECTED ( 'Table' ), [TypeID] = MAX ( 'Table'[TypeID] ) )
    )
VAR _rank =
    RANKX (
        FILTER ( ALLSELECTED ( 'Table' ), [TypeID] = MAX ( 'Table'[TypeID] ) ),
        CALCULATE ( SUM ( 'Table'[RecentLevel] ) ),
        ,
        DESC,
        DENSE
    )
RETURN
    IF ( _date = MAX ( 'Table'[Date] ) && _rank = 1, 1 )

1.png

 

 

 

Best Regards,

Stephen Tao

 

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

1 REPLY 1
Anonymous
Not applicable

Hi @IF ,

 

Create the following measure and put it into Filters, set show items when the value is 1.

Measure =
VAR _date =
    CALCULATE (
        MAX ( 'Table'[Date] ),
        FILTER ( ALLSELECTED ( 'Table' ), [TypeID] = MAX ( 'Table'[TypeID] ) )
    )
VAR _rank =
    RANKX (
        FILTER ( ALLSELECTED ( 'Table' ), [TypeID] = MAX ( 'Table'[TypeID] ) ),
        CALCULATE ( SUM ( 'Table'[RecentLevel] ) ),
        ,
        DESC,
        DENSE
    )
RETURN
    IF ( _date = MAX ( 'Table'[Date] ) && _rank = 1, 1 )

1.png

 

 

 

Best Regards,

Stephen Tao

 

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Helpful resources

Announcements
FabCon Global Hackathon Carousel

FabCon Global Hackathon

Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes!

October Power BI Update Carousel

Power BI Monthly Update - October 2025

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

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 Solution Authors