Forum Discussion

littlepatos's avatar
littlepatos
Helper II
3 years ago
Solved

Display Highest Value on Card using Filter

I would like to display highest value, filtered by category (Activity Type) to only show Walking (Activity Type) and display as Distance & Month. Therefore card value would change depending on which Month I walked the highest number of Distance. Eg: Expected Result: January 94

I've tried to create a measure but unsure how to add Filter to only display Activity Type Walking

 

Distance max per Month =
MAXX(
SUMMARIZE(Activities,Activities[Distance]
),[Measure]),allselected())

 

Activity Type                            Date                          Distance

Strength Training31/12/20220
Yoga31/12/20220
Elliptical31/12/20220
Kayaking30/12/20221.74
Strength Training29/12/20220
Yoga29/12/20220
Walking29/12/20224.21
Strength Training28/12/20220
Yoga28/12/20220
Indoor Cycling28/12/20220
Strength Training27/12/20220
Yoga27/12/20220
Walking27/12/20223.82
Strength Training26/12/20220
Yoga26/12/20220
Elliptical26/12/20220
Yoga24/12/20220
Indoor Cycling24/12/20220
Walking23/12/20225.29
Yoga21/12/20220
Walking21/12/20225.26
Walking20/12/20225.06
Yoga18/12/20220
Indoor Cycling18/12/20220
Pool Swimming17/12/2022700
Strength Training17/12/20220
Yoga17/12/20220
Walking17/12/20224.9
Yoga11/12/20220

5 Replies

  • Hi Ashish_Mathur Thanks for your assistance. 

    1) Max distance travelled in any month - Correct and working as expected

    2) Period of Max Distance Travelled is showing December which is the highest before applying filter to show only Walking. How can I add filter to Measure to only show walking? 

    Any ideas where i may be going wrong?

    • Ashish_Mathur's avatar
      Ashish_Mathur
      Super User

      You are welcome.  Unless i see your file, I cannot comment.  Share the download link fo the PBI file and show the expected result.  Ensure that in the slicer, you select Walking.

      • littlepatos's avatar
        littlepatos
        Helper II

        All good- I worked out how to add filter to the visual.  Thanks again for your help.