Power BI is turning 10, and we’re marking the occasion with a special community challenge. Use your creativity to tell a story, uncover trends, or highlight something unexpected.
Get startedJoin us for an expert-led overview of the tools and concepts you'll need to become a Certified Power BI Data Analyst and pass exam PL-300. Register now.
Hello experts!
I need to filter the report to recognize the most recent date, then filter to only show results for the group of that date. For example...
The most recent event date on the database = 1/29/16 . So I need the filter to ONLY show results for 6 days in event# 152. This will prevent me from having to manually code the event# in the report each time a new event happens. Any ideas?
Im a newbie to this, so a simple-mans answer would be much appreciated 😄
DATE | Event# | Day of Event | RevCat1 | RevCat2 | RevCat3 | RevCat4 | RevCat5 |
1/3/2016 | 150 | 1 | $0.00 | $0.00 | $0.00 | $0.00 | $0.00 |
1/3/2016 | 150 | 2 | $0.00 | $0.00 | $0.00 | $0.21 | ($104.00) |
1/4/2016 | 150 | 3 | $50.00 | $0.00 | $0.00 | $1,948.89 | $308.50 |
1/5/2016 | 151 | 1 | $0.00 | $0.00 | $0.00 | $0.00 | $0.00 |
1/6/2016 | 151 | 2 | $0.00 | $0.00 | $0.00 | $779.61 | $307.00 |
1/7/2016 | 151 | 3 | $0.00 | $0.00 | $413.00 | $897.78 | $1,011.00 |
1/8/2016 | 151 | 4 | $0.00 | $0.00 | $0.00 | $2,175.40 | ($618.00) |
1/9/2016 | 151 | 5 | $0.00 | $1,040.50 | $0.00 | ($21.06) | $614.50 |
1/10/2016 | 151 | 6 | $28.50 | $0.00 | $0.00 | $445.66 | $526.00 |
1/11/2016 | 152 | 1 | $0.00 | $0.00 | $0.00 | $810.06 | $662.50 |
1/12/2016 | 152 | 2 | $360.50 | $0.00 | $0.00 | $344.23 | $1,268.00 |
1/27/2016 | 152 | 3 | $0.00 | $0.00 | $0.00 | $720.20 | $1,301.00 |
1/27/2016 | 152 | 4 | $0.00 | $0.00 | $0.00 | $956.91 | $643.50 |
1/28/2016 | 152 | 5 | $0.00 | $0.00 | $287.00 | $1,158.48 | $2,290.50 |
1/29/2016 | 152 | 6 | $198.00 | $21,876.00 | $276.00 | $1,335.29 | $726.00 |
Hi Pchapple,
According to your description, you need to only show most recent event date with add any filter, right?
I have tested it on my local environment, there is no any Minimum and Maximum option for a date value.
So you need to create another table to get only the lastest date for each event, and then use the new created table to create visuals.
Create a column in the original table
LatestDate = CALCULATE(MAX(Latest[DATE]),ALLEXCEPT(Latest,Latest[Event#]))
Then create a new table
LatestEvent = SUMMARIZE(Latest,Latest[Event#])
Add those columns to the new created table.
LatestDate = LOOKUPVALUE(Latest[LatestDate],Latest[Event#],LatestEvent[Event#])
RevCat1 = LOOKUPVALUE(Latest[RevCat1],Latest[DATE],LatestEvent[LatestDate],Latest[Event#],LatestEvent[Event#])
RevCat2 = LOOKUPVALUE(Latest[RevCat2],Latest[DATE],LatestEvent[LatestDate],Latest[Event#],LatestEvent[Event#])
RevCat3 = LOOKUPVALUE(Latest[RevCat3],Latest[DATE],LatestEvent[LatestDate],Latest[Event#],LatestEvent[Event#])
RevCat4 = LOOKUPVALUE(Latest[RevCat4],Latest[DATE],LatestEvent[LatestDate],Latest[Event#],LatestEvent[Event#])
RevCat5 = LOOKUPVALUE(Latest[RevCat5],Latest[DATE],LatestEvent[LatestDate],Latest[Event#],LatestEvent[Event#])
Regards,
Charlie Liao
Thanks @v-caliao-msft
When you are referecning the table Latest... for example...
LatestDate = CALCULATE(MAX(Latest[DATE]),ALLEXCEPT(Latest,Latest[Event#]))
What table are you refering to? Is it the original table? When I try to create the new column in the original table as you described, its giving me an error.
Sorry for the newbie questions...
Paul
Hi Pchapple,
Yes, create calculated column in the original table. Please share us the error message, so that we can make further analysis.
Regards,
Charlie Liao
Have created the column as suggested however the process for creating a table seems unclear. Maybe Im not creating the table rtight, but it does not seem that the formulae works when I use ENTER DATA to create a new table.
You say "Then create a new table
LatestEvent = SUMMARIZE(Latest,Latest[Event#])" however this does not seem to return any results when pasted into the 1st cell
Thanks
Hi Pchapple,
I have create a table by using Enter Data, everything works fine. Here are the steps for you reference.
Regards,
Charlie Liao
@Anonymous Create the 2 Measures and then replace [Date] in your Table Visual with Last Date and [Event#] with Last Event#
Last Date = CALCULATE ( LASTDATE ( 'Table'[DATE] ), ALL ( 'Table' ) ) Last Event# = CALCULATE ( VALUES ( 'Table'[Event#] ), LASTDATE ( 'Table'[DATE] ), ALL ( 'Table' ) )
Thanks! This works to create the data for the most recent Event# recorded (thakn you!!). However, the system won't let me use this Measure as a Report Filter. (can't drag it into the report filter box). Any ideas?
Last Date formula will work as a column too...
Thanks Sean, Sorry for the rooky questions. How do I use these in the Page FIlter setting? When I drag the info in (either columns or measurews), it still requires me to select and event#
Basically, Im trying not to over load the reader with data, so want the page to automatically filter to show only the current event data. (most recent event).
Thanks for your support on this!
This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.
Check out the June 2025 Power BI update to learn about new features.
User | Count |
---|---|
80 | |
76 | |
60 | |
36 | |
33 |
User | Count |
---|---|
91 | |
60 | |
59 | |
49 | |
45 |