cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Sachy123
Helper IV
Helper IV

How to select particular record at selected date and time

My data is in the following format

ReportDateUpdateDateColumn AColumn B
31st December 202020/12/2020 8:00:001080
31st December 202015/12/2020 10:30:008800
31st December 202001/12/2020 8:00:004432
30th November 202029/11/2020 10:30:009099
30th November 202026/11/2020 14:00:334467
30th November 202015/11/2020 15:00:445020

 

EDIT :::

Also I have a DateDimension in my model.  I donot want to sum the data , but select only the data which is for the latest update date.

How can I do it?

@parry2k   The solution seems to be fine but problem is that donot want to perform any aggregations on the QTY(Column A and Column B)

 

 

So in the report, I would like to have only the updated data for each reporting month like below

ReportDateUpdateDateColumn AColumn B
31st December 202020/12/2020 8:00:001080
30th November 202029/11/2020 10:30:009099
1 ACCEPTED SOLUTION
v-henryk-mstf
Community Support
Community Support

Hi @Sachy123 ,

 

According to your requirements, I did the following test and did not aggregate column A and column B. I created Filter_column measure filters out the max date under the group. Then, the customer filter is used to filter out “is not blank” rows.

v-henryk-mstf_0-1609381047625.png

v-henryk-mstf_1-1609381056635.png

Here is the sample .pbix file.

 

Best Regards,
Henry

 

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

3 REPLIES 3
v-henryk-mstf
Community Support
Community Support

Hi @Sachy123 ,

 

According to your requirements, I did the following test and did not aggregate column A and column B. I created Filter_column measure filters out the max date under the group. Then, the customer filter is used to filter out “is not blank” rows.

v-henryk-mstf_0-1609381047625.png

v-henryk-mstf_1-1609381056635.png

Here is the sample .pbix file.

 

Best Regards,
Henry

 

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

Sachy123
Helper IV
Helper IV

 

 

Thanks but I am using a Date Dimension which is linked to Report date . but the problem is that it gives me multiple instances of Update Date.. 😞

 

And my DateDimension is without time, so it cannot actually find records if I ocnnect the datekey to the UpdateDate Column.. 

 

E.g. 20/12/2020 8:00:00 is not equal to 20/12/2020 0:00:00

parry2k
Super User III
Super User III

@Sachy123 you can add following measure for both the columns

 

Update Date Max = 
CALCULATE ( MAX ( Table[UpdateDate] ), ALLEXCEPT ( Table, Table[ReportDate] ) )

 

and use above measure to get the quantity

 

Max Qty Update Date = 
VAR __maxUpdateDate = [Update Date Max]
RETURN
CALCULATE ( SUM ( Table[Qty] ), ALLEXEPT ( Table, Table[ReportDate] ), Table[UpdateDate] = __maxUpdateDate
)





Did I answer your question? Mark my post as a solution.

Proud to be a Super User! Appreciate your Kudos 🙂
Feel free to email me with any of your BI needs.





Helpful resources

Announcements
PBI User Groups

Welcome to the User Group Public Preview

Check out new user group experience and if you are a leader please create your group!

MBAS on Demand

Microsoft Business Applications Summit sessions

On-demand access to all the great content presented by the product teams and community members! #MSBizAppsSummit #CommunityRocks

Get Ready for Power BI Dev Camp

Power BI Dev Camp - June 24th

Mark your calendars and join us for our next Power BI Dev Camp!

Top Solution Authors
Top Kudoed Authors