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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
ghost10
Frequent Visitor

Get particular column value if previous and current date data are different

Hi Team,

I have columns called Snp rating , security id and holdings date.

Logic is get security id only  if current date snp rating & previous date snp rating are different for same we should not get any security id.

1 ACCEPTED SOLUTION
v-yinliw-msft
Community Support
Community Support

Hi @ghost10 ,

 

You can try this method:

Here are my Sample data:

vyinliwmsft_0-1665996644352.png

vyinliwmsft_2-1665996679157.png

 

And then create a new table:

Result Table =
SUMMARIZE (
    'Table',
    'Table'[SecurityID],
    'Table'[Snp rating],
    Table2[Current snp rating],
    "Select ID",
        IF (
            'Table'[Snp rating] = 'Table2'[Current snp rating],
            'Table'[SecurityID],
            BLANK ()
        )
)

 

vyinliwmsft_3-1665996763227.png

Is this the result you expect?

 

Hope this helps you.

 

Best Regards,

Community Support Team _Yinliw

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

2 REPLIES 2
v-yinliw-msft
Community Support
Community Support

Hi @ghost10 ,

 

You can try this method:

Here are my Sample data:

vyinliwmsft_0-1665996644352.png

vyinliwmsft_2-1665996679157.png

 

And then create a new table:

Result Table =
SUMMARIZE (
    'Table',
    'Table'[SecurityID],
    'Table'[Snp rating],
    Table2[Current snp rating],
    "Select ID",
        IF (
            'Table'[Snp rating] = 'Table2'[Current snp rating],
            'Table'[SecurityID],
            BLANK ()
        )
)

 

vyinliwmsft_3-1665996763227.png

Is this the result you expect?

 

Hope this helps you.

 

Best Regards,

Community Support Team _Yinliw

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

Stachu
Community Champion
Community Champion

Can you add sample tables (in format that can be copied to PowerBI) from your model with anonymised data? Like this (just copy and paste into the post window).

Column1Column2
A1
B2.5

What do you consider a previous date in this scenario? Current date - 1 day, previous entry in the table, biggest date smaller than current, other? Also is there any additional key that's relevant (e.g. different companies/items that are rated on the same days? Can there be duplicate dates for single entity?

Also, are you looking for Dax or M solution? 



Did I answer your question? Mark my post as a solution!
Thank you for the kudos 🙂

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

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

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.

Top Solution Authors