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

Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and more. Get started

Reply
DerMoe
Frequent Visitor

Select latest Date and use it as a filter

Hi guys

I have the following table

 

CompanyCategoryValueDate
Test GmbHAThis is a Test2022-04
Test GmbHAThis is also a Test2022-03
Test GmbHBHello ABC2022-02
ABC GmbHAThis is a Test2022-04


I have created a parameter which selects the company.

Now I want to display only the latest value in a Category. Like here:

Paramter Company: Test GmbH and Filter for Category A

CompanyCategoryValueDate
Test GmbHAThis is a Test2022-04

 

Currently i am reciving this table:

 

CompanyCategoryValueDate
Test GmbHAThis is a Test2022-04
Test GmbHAThis is also a Test2022-03

When I want to filter the latest date with Last(Date), the software tells me I can't use aggregation functions as filter. How can I get the latest date and use it as a filter parameter?

 

Greetings

1 ACCEPTED SOLUTION

Hi guys

thank you for your support.

I was just able to solve it myself by using a matrix instead of a table and the aggregation function Last.

Greetings

View solution in original post

4 REPLIES 4
v-yanjiang-msft
Community Support
Community Support

Hi @DerMoe ,

In Power Query, after you use Paramter Company: Test GmbH and Filter for Category A, in the date column, there is a Date Filters option, select Is Latest.

vkalyjmsft_0-1648023192428.png

Get the expected result.

vkalyjmsft_1-1648023458214.png

 

I attach my sample below for reference.

 

Best Regards,
Community Support Team _ kalyj

If this posthelps, then please considerAccept it as the solutionto help the other members find it more quickly.   

 

Hi guys

thank you for your support.

I was just able to solve it myself by using a matrix instead of a table and the aggregation function Last.

Greetings

Hi guys

thanks for the answers and  sorry for the late reply.

Unfortunately I work with Power BI Report Builder and not with Desktop.

Would anyone have a solution for the Report Builder?

Greetings

Tutu_in_YYC
Resident Rockstar
Resident Rockstar

You can try the function LASTNONBLANK. I see that you value is a text.

Measure = 
LASTNONBLANK (TableName[Value], 0 )

.

Helpful resources

Announcements
Fabcon_Europe_Social_Bogo

Europe’s largest Microsoft Fabric Community Conference

Join the community in Stockholm for expert Microsoft Fabric learning including a very exciting keynote from Arun Ulag, Corporate Vice President, Azure Data.

Power BI Carousel June 2024

Power BI Monthly Update - June 2024

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

RTI Forums Carousel3

New forum boards available in Real-Time Intelligence.

Ask questions in Eventhouse and KQL, Eventstream, and Reflex.

Top Solution Authors