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

Level up your Power BI skills this month - build one visual each week and tell better stories with data! Get started

Reply
Anonymous
Not applicable

Latest Status

Hi ALL

 

We need to show the membership status on the selected transaction date for each user. In another fact table, we have the membership status for specific date ranges and sequences. Finally, we need to show the selected transaction date between which membership status they have and the latest sequence values. If anyone can figure this measure out, please let me know

 



Victor_sp_0-1674011676784.png


The output should be like this 


Victor_sp_1-1674011849027.png

 

 

1 ACCEPTED SOLUTION
amitchandak
Super User
Super User

@Anonymous , Create a new column in table 1

 

New =

var _max =maxx(filter(Table2, Table1[user_id] = Table2[user_id]  && Table1[Transaction Date] >= Table2[Start Date]

&& Table1[Transaction Date] <= Table2[End Date]) , Table2[Status])

return

coalesce(_max, "Inactive")

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

View solution in original post

3 REPLIES 3
Anonymous
Not applicable

Hi @Anonymous ,

Please try below steps:

1. create a measure with below dax formula

Measure =
VAR cur_uid =
    SELECTEDVALUE ( Table1[User id] )
VAR max_date =
    MAXX (
        FILTER ( ALL ( Table1 ), Table1[User id] = cur_uid ),
        [Transaction Date]
    )
VAR tmp =
    FILTER ( ALL ( Table2 ), Table2[User id] = cur_uid )
VAR tmp1 =
    ADDCOLUMNS (
        tmp,
        "Flag",
            IF ( max_date >= Table2[From Date] && max_date <= Table2[To Date], 1 )
    )
VAR val =
    CALCULATE ( MAX ( Table2[Sequnence] ), FILTER ( tmp1, [Flag] = 1 ) )
VAR _result =
    CALCULATE (
        MAX ( Table2[Status] ),
        FILTER ( ALL ( Table2 ), Table2[User id] = cur_uid && Table2[Sequnence] = val )
    )
RETURN
    _result

2. add a table visual with Table1 field and measure

vbinbinyumsft_0-1674548466490.png

Please refer the attached .pbix file.

 

Best regards,
Community Support Team_Binbin Yu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

amitchandak
Super User
Super User

@Anonymous , Create a new column in table 1

 

New =

var _max =maxx(filter(Table2, Table1[user_id] = Table2[user_id]  && Table1[Transaction Date] >= Table2[Start Date]

&& Table1[Transaction Date] <= Table2[End Date]) , Table2[Status])

return

coalesce(_max, "Inactive")

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube
Anonymous
Not applicable

Hi @amitchandak 

Will it work For Sequence wise also?

Helpful resources

Announcements
April Power BI Update Carousel

Power BI Monthly Update - April 2026

Check out the April 2026 Power BI update to learn about new features.

Fabric SQL PBI Data Days

Data Days 2026 coming soon!

Sign up to receive a private message when registration opens and key events begin.

New to Fabric survey Carousel

New to Fabric Survey

If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.

Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.