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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
lordtopcat
Helper I
Helper I

Top 5 displaying all results?

Hi,

 

What am I doing wrong? I want to display the top 5 Timeline ID's by latest packdatetime. What have I missed to make it work?

 

pbitop.png

 

Latest version of PBI Desktop. Not sure what's going on...

 

Cheers

1 ACCEPTED SOLUTION
AllisonKennedy
Super User
Super User

This is because you are filtering the TimelineID not the PackDateTime. Try changing the PackDateTime on your table to 'latest PackDateTime' (click the down arrow next to PackDateTime in the fields pane for the visual) and that should demonstrate a bit better what's actually happening with this filter. 

 

Has this post solved your problem? Please mark it as a solution so that others can find it quickly and to let the community know your problem has been solved. 

 

If you found this post helpful, please give Kudos.

I work as a trainer and consultant for Microsoft 365, specialising in Power BI and Power Query. 

https://sites.google.com/site/allisonkennedycv


Please @mention me in your reply if you want a response.

Copying DAX from this post? Click here for a hack to quickly replace it with your own table names

Has this post solved your problem? Please Accept as Solution so that others can find it quickly and to let the community know your problem has been solved.
If you found this post helpful, please give Kudos C

I work as a Microsoft trainer and consultant, specialising in Power BI and Power Query.
www.excelwithallison.com

View solution in original post

4 REPLIES 4
v-zhenbw-msft
Community Support
Community Support

Hi @lordtopcat ,

 

How about the result after you follow the suggestions mentioned in my original post?
Could you please provide more details or expected result about it If it doesn't meet your requirement?

 

Best regards,

 

Community Support Team _ zhenbw

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

v-zhenbw-msft
Community Support
Community Support

Hi @lordtopcat ,

 

Does your two columns from one table or two tables?

 

Based on my test, If the two columns from different table and the relationship between time table and fact table is one to many, the filter value in TimelineID, it can show the result that you have shared.

 

TOP 1.jpg

 

We can solve this issue by following way:

 

Put the [PackdateTime] that is the same table with [timelineID] in filter value.

 

TOP 2.jpg

 

If it doesn’t meet your requirement, Could you please provide a mockup sample  based on fake data or describe the fields of each tables and the relations between tables simply?

 

BTW, pbix as attached.

 

Best regards,

 

Community Support Team _ zhenbw

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

amitchandak
Super User
Super User

@lordtopcat , What I doubt Typically visual filter of Top N is a measure filter. So better you create a rank on the date and use that.

 

For Rank Refer these links
https://radacad.com/how-to-use-rankx-in-dax-part-2-of-3-calculated-measures
https://radacad.com/how-to-use-rankx-in-dax-part-1-of-3-calculated-columns
https://radacad.com/how-to-use-rankx-in-dax-part-3-of-3-the-finale

 

 

 

AllisonKennedy
Super User
Super User

This is because you are filtering the TimelineID not the PackDateTime. Try changing the PackDateTime on your table to 'latest PackDateTime' (click the down arrow next to PackDateTime in the fields pane for the visual) and that should demonstrate a bit better what's actually happening with this filter. 

 

Has this post solved your problem? Please mark it as a solution so that others can find it quickly and to let the community know your problem has been solved. 

 

If you found this post helpful, please give Kudos.

I work as a trainer and consultant for Microsoft 365, specialising in Power BI and Power Query. 

https://sites.google.com/site/allisonkennedycv


Please @mention me in your reply if you want a response.

Copying DAX from this post? Click here for a hack to quickly replace it with your own table names

Has this post solved your problem? Please Accept as Solution so that others can find it quickly and to let the community know your problem has been solved.
If you found this post helpful, please give Kudos C

I work as a Microsoft trainer and consultant, specialising in Power BI and Power Query.
www.excelwithallison.com

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

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

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.