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

Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.

Reply
JB
Helper II
Helper II

Table visual not filtering last entries correctly

I am trying to make a table visual display the current status of a project by setting the value filter to 'show last', but I found that it often returns random results or tries to create an average instead. I can't use a date filter instead of 'show last' as these projects may not be updated at set intervals and it's possible that one will receive multiple updates within the timeframe granted, whereas another will receive none and be left out of the filter. 

 

In order to test the problem I created a fake data set to demonstrate in a simple manner: 

JB_0-1644925558238.png

As you can see, the last entry for Grapes is Mouldy and the colour (used as a field value for conditional formatting) is red. But...

JB_1-1644925678073.png

PowerBI thinks the last entry for Grapes is Unripe, and it's also created a discrepency between the status and the colour conditioning. It's taken the status from January/March and the colour status from February, despite none of these months being the last entry in the data set. It does this for all the fruits in the table. 

 

What's going on here? Why won't PBI just show the last entries like it's been asked to? 

2 REPLIES 2
amitchandak
Super User
Super User

@JB , Create a measure like this and use

 

Measure =
VAR __id = MAX ('Table'[Fruit] )
VAR __date = CALCULATE ( MAX('Table'[Date] ), ALLSELECTED ('Table' ), 'Table'[Fruit] = __id )
CALCULATE ( MAX ('Table'[Status] ), VALUES ('Table'[Fruit] ),'Table'[Fruit] = __id,'Table'[Date] = __date )

 

 

If needed create a date column

Thanks, after some initial trouble I got that measure working by inserting 'return' in between the third and fourth lines. 

This works as intended on a table, but is there any way to replicate the results in pie/donut charts? They continue to display wrong information and won't accept the above measure as a value.

Thanks again for your help

Helpful resources

Announcements
RTI Forums Carousel3

New forum boards available in Real-Time Intelligence.

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

MayPowerBICarousel

Fabric Monthly Update - May 2024

Check out the May 2024 Fabric update to learn about new features.

LearnSurvey

Fabric certifications survey

Certification feedback opportunity for the community.