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

The ultimate Microsoft Fabric, Power BI, Azure AI & SQL learning event! Join us in Las Vegas from March 26-28, 2024. Use code MSCUST for a $100 discount. Register Now

Reply
littlepatos
Helper II
Helper II

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())

 

littlepatos_0-1675568703325.pnglittlepatos_1-1675568751325.png

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
1 ACCEPTED SOLUTION
Ashish_Mathur
Super User
Super User

Hi,

You may download my PBI file from here.

Hope this helps.

Untitled.png


Regards,
Ashish Mathur
http://www.ashishmathur.com
https://www.linkedin.com/in/excelenthusiasts/

View solution in original post

5 REPLIES 5
littlepatos
Helper II
Helper II

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? 

littlepatos_0-1675575157612.png

Any ideas where i may be going wrong?

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.


Regards,
Ashish Mathur
http://www.ashishmathur.com
https://www.linkedin.com/in/excelenthusiasts/

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

You are welcome.


Regards,
Ashish Mathur
http://www.ashishmathur.com
https://www.linkedin.com/in/excelenthusiasts/
Ashish_Mathur
Super User
Super User

Hi,

You may download my PBI file from here.

Hope this helps.

Untitled.png


Regards,
Ashish Mathur
http://www.ashishmathur.com
https://www.linkedin.com/in/excelenthusiasts/

Helpful resources

Announcements
Fabric Community Conference

Microsoft Fabric Community Conference

Join us at our first-ever Microsoft Fabric Community Conference, March 26-28, 2024 in Las Vegas with 100+ sessions by community experts and Microsoft engineering.

February 2024 Update Carousel

Power BI Monthly Update - February 2024

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

Fabric Career Hub

Microsoft Fabric Career Hub

Explore career paths and learn resources in Fabric.

Fabric Partner Community

Microsoft Fabric Partner Community

Engage with the Fabric engineering team, hear of product updates, business opportunities, and resources in the Fabric Partner Community.