cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
GSinghking Member
Member

Only give me last reading of each day. with output of true or false

 
2 ACCEPTED SOLUTIONS

Accepted Solutions

Re: Only give me last reading of each day. with output of true or false

Hi @GSinghking,

 

Would this work?

 

First, I created a summary column for "Date" to help the aggregation:

Date = FORMAT( 'Table'[Timestamp],"mm/dd/yyyy" )

Then I created your desired binary column:

IsLatest = IF( CALCULATE( MAX( Table[Timestamp] ), ALLEXCEPT (Table, Table[ID], Table[Date] )) = Table[Timestamp], "True", "False" )

GroupDate.PNG

Super User
Super User

Re: Only give me last reading of each day. with output of true or false

Hi @GSinghking 

Try this for your calculated column:

 

NewCol =
VAR LastInDay_ =
    CALCULATE (
        MAX ( Table1[Timestamp] ),
        INT ( Table1[Timestamp] ) = INT ( EARLIER ( Table1[Timestamp] ) ),
        ALLEXCEPT ( Table1, Table1[ID] )
    )
RETURN
    IF ( Table1[Timestamp] = LastInDay_, TRUE(), FALSE() )

 

3 REPLIES 3

Re: Only give me last reading of each day. with output of true or false

Hi @GSinghking,

 

Would this work?

 

First, I created a summary column for "Date" to help the aggregation:

Date = FORMAT( 'Table'[Timestamp],"mm/dd/yyyy" )

Then I created your desired binary column:

IsLatest = IF( CALCULATE( MAX( Table[Timestamp] ), ALLEXCEPT (Table, Table[ID], Table[Date] )) = Table[Timestamp], "True", "False" )

GroupDate.PNG

Super User
Super User

Re: Only give me last reading of each day. with output of true or false

Hi @GSinghking 

Try this for your calculated column:

 

NewCol =
VAR LastInDay_ =
    CALCULATE (
        MAX ( Table1[Timestamp] ),
        INT ( Table1[Timestamp] ) = INT ( EARLIER ( Table1[Timestamp] ) ),
        ALLEXCEPT ( Table1, Table1[ID] )
    )
RETURN
    IF ( Table1[Timestamp] = LastInDay_, TRUE(), FALSE() )

 

Community Support Team
Community Support Team

Re: Only give me last reading of each day. with output of true or false

Hi @GSinghking ,

Have you solved your problem with the suggestions of AlB and BekahLoSurdo ?

If you have solved, please always accept the replies making sense as solution to your question so that people who may have the same question can get the solution directly.

If you still need help, please share some data sample which could reproduce your scenario and your desired output so that we could help further on it.

Best  Regards,

Cherry

 

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

Helpful resources

Announcements
Community Highlights

Community Highlights

Find out what's new in the Power BI Community!

Summit North America

Power Platform Summit North America

Register by September 5 to save $200

Virtual Launch Event

Microsoft Business Applications Virtual Launch Event

Watch the event on demand for an in-depth look at the new innovations across Dynamics 365 and the Microsoft Power Platform.

MBAS Gallery

Watch Sessions On Demand!

Continue your learning in our online communities.

Users Online
Currently online: 113 members 1,843 guests
Please welcome our newest community members: