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

Measure that display the latest result

Hi all,

 

I have a data set that looks something like this:

GroupValueDate
A81/12/20
B91/12/20
A61/1/20
B81/1/20

 

I would like to create a measure that gives the latest value as the output for each group. For example, in this case, I would like the measure to output 6 for group A, and 8 for group B. I am working with live data. Therefore, data will be updated every month to include the month's group and value. For example, when it is February, 2 new rows will appear with their own unique values. I would like to just pull out the latest values only. Any help would be appreciated. Thanks

2 ACCEPTED SOLUTIONS
Super User IV
Super User IV

@7ea8ea , Try a measure like

calculate(max(Table[Value]), filter(Table, Table[Date] = calculate(Min(Table[Date]), allexcept(Table, Table[Group])))



Did I answer your question? Mark my post as a solution! Appreciate your Kudos!!
Dashboard of My Blogs !! YouTube Channel !! Connect on Linkedin

Proud to be a Super User!

View solution in original post

Two meausres

calculate(max(Table[Value]), filter(Table, Table[Date] = calculate(Min(Table[Date]), allexcept(Table, Table[Group]))) , Table[group] = "A")
calculate(max(Table[Value]), filter(Table, Table[Date] = calculate(Min(Table[Date]), allexcept(Table, Table[Group]))) , Table[group] = "B")



Did I answer your question? Mark my post as a solution! Appreciate your Kudos!!
Dashboard of My Blogs !! YouTube Channel !! Connect on Linkedin

Proud to be a Super User!

View solution in original post

3 REPLIES 3
Super User IV
Super User IV

@7ea8ea , Try a measure like

calculate(max(Table[Value]), filter(Table, Table[Date] = calculate(Min(Table[Date]), allexcept(Table, Table[Group])))



Did I answer your question? Mark my post as a solution! Appreciate your Kudos!!
Dashboard of My Blogs !! YouTube Channel !! Connect on Linkedin

Proud to be a Super User!

View solution in original post

Hi maybe i didnt explain it properly. I would like to create 2 measures. One for group A and one for Group B. 

Two meausres

calculate(max(Table[Value]), filter(Table, Table[Date] = calculate(Min(Table[Date]), allexcept(Table, Table[Group]))) , Table[group] = "A")
calculate(max(Table[Value]), filter(Table, Table[Date] = calculate(Min(Table[Date]), allexcept(Table, Table[Group]))) , Table[group] = "B")



Did I answer your question? Mark my post as a solution! Appreciate your Kudos!!
Dashboard of My Blogs !! YouTube Channel !! Connect on Linkedin

Proud to be a Super User!

View solution in original post

Helpful resources

Announcements
secondImage

Congratulations!

We are excited to announce the Power BI Super Users!

Wave Release 2

Check out the updates in Power BI.

Overview of Power BI 2020 release wave 2!

Get Ready for Power BI Dev Camp

Get Ready for Power BI Dev Camp

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

secondImage

The largest Power BI virtual conference

100+ sessions, 100+ speakers, Product managers, MVPs, and experts. All about Power BI. Attend online or watch the recordings.

Top Solution Authors
Top Kudoed Authors