cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Jon54
Frequent Visitor

using max column value as filter in scatter chart

Hello,

I have data from following URL:

https://fingertips.phe.org.uk/api/all_data/csv/by_indicator_id?indicator_ids=811%2C%2022001%2C%2030301&child_area_type_id=402&parent_area_type_id=6

The 3 datasets returned for different Indicator IDs use different 'Time period' formats. The 'Time period sortable' field instead is more user friendly. I want to be able to create a line chart showing trend and a map and scatter chart showing just the latest data for each indicator: 

Jon54_0-1661266047594.png

How can I force the scatter chart and map to use the last year for which the different indicators have data as sometimes this is 20200000 and sometimes this is 20210000. I have tried chiclet slicer with forced selection but I want to hide that and when I do so, the scatter chart and map don't always update when the indicator name is changed. Without such a slicer or filter in place the values for the indicators are being summed over all the available years of data for each Area.

Any advice greatly appreciated

1 ACCEPTED SOLUTION
PaulDBrown
Super User
Super User

It would help if you could show us the structure of the dataset. 
However, try creating a measure along the lines of:

Filter year = CALCULATE (MAX(Table[Time period sortable]), ALL(Table[Time period sortable)))

Add the Timeperiod sortable field to the filter pane for each visual. In the dropdown, select TopN and set the value to greater or equal to 1





Did I answer your question? Mark my post as a solution!
In doing so, you are also helping me. Thank you!

Proud to be a Super User!
Paul on Linkedin.






View solution in original post

2 REPLIES 2
Jon54
Frequent Visitor

Thanks @PaulDBrown , worked perfectly. Jon

PaulDBrown
Super User
Super User

It would help if you could show us the structure of the dataset. 
However, try creating a measure along the lines of:

Filter year = CALCULATE (MAX(Table[Time period sortable]), ALL(Table[Time period sortable)))

Add the Timeperiod sortable field to the filter pane for each visual. In the dropdown, select TopN and set the value to greater or equal to 1





Did I answer your question? Mark my post as a solution!
In doing so, you are also helping me. Thank you!

Proud to be a Super User!
Paul on Linkedin.






Helpful resources

Announcements
May 2023 update

Power BI May 2023 Update

Find out more about the May 2023 update.

Submit your Data Story

Data Stories Gallery

Share your Data Story with the Community in the Data Stories Gallery.

Top Solution Authors