Forum Discussion
Filter visuals with position data to show only current position per tracking unit
- 5 years ago
Hi olepropell ,
I created a slicer button and a measure to do this.
Create a table for the slicer mine has the following values:
Values
All Values Latest Values Now create the following measure:
Latest_Values = VAR temp_table = SUMMARIZE ( ALL ( 'Table'[TrackerID], 'Table'[Date], 'Table'[Lat], 'Table'[Long] ), 'Table'[TrackerID], "DATE", MAX ( 'Table'[Date] ) ) RETURN SWITCH ( SELECTEDVALUE ( 'Period Selection'[Values] ), "All Values", 1, IF ( SELECTEDVALUE ( 'Table'[Date] ) = MAXX ( FILTER ( temp_table, 'Table'[TrackerID] = MAX ( 'Table'[TrackerID] ) ), [DATE] ), 1 ) )Now add this has filter on your visualizations and select all non blank vlaues
Result below and in attach PBIX file.
I am having trouble getting all the data into the temp-table. Transport and Trigger is collected from two help-tables, Knot is a measure in the main table (TrackingsDQ) while Course and Battery are regular data fields in the main table.
If I for example try to collect Transport from the help table dTransport this is what happens:
Are there other and more straight-forward strategies for singeling out the latest rows? A more sophisticated time slicer or other things?
Hi, olepropell
According to your DAX formula, I think the problem exists in the SUMMARIZE() function you used, you can’t use a column from another table here:
You can try to nest a RELATED() function in the outer layer of this column, but you should make sure the two tables must have a relationship first.
RELATED(dTransport[Transport])
What’s more, to get more detailed help from other experts, I suggest you to open a new case in the community. Because most communitors can’t see your question because it’s under another topic.
Thank you very much!
How to Get Your Question Answered Quickly
Best Regards,
Community Support Team _Robert Qin
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.