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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
Suna
Helper I
Helper I

Highest value is wrong if there are two same values in the data

I have a table with months and values. I want to get the highest value and what month that is. First I just put the values in a card and filtered it to top N is 1. It worked great until the data had two same values. So for example

 

Jan  378

Feb  410

Mar  398

Apr  423

May 441

June 423

 

The card should show 441 but it shows 846, it sums up the two same values for some reason.

 

Next I tried to just make Dax measure with MAX ([Value]) but that comes up with 423. So basically same problem.

 

I kinda would understand this logic if the two same values would be the highest ones but now I'm just confused 🙂 Any ideas how to get past this error?Now I'm just thinking I need to just not have two same values. So I would change one of the 423 to 422 or something. Then both of these would get highest value of 441.

 

If there is a path to success about fixing the double value problem, how do I make my card title dax work too? Now when it shows the value of two months it cannot tell what is the highest month. My dax for that is:

"text" & SELECTEDVALUE ([monthname]) & "text"

In case the two values are the highest ones, could I change the dax for something like if there is two or more answers give the latest one (so if Jan and Feb it would show Feb)?

1 ACCEPTED SOLUTION
az38
Community Champion
Community Champion

@Suna 

what kind of visual do you use?

do month names repeat in your data more than 1 time?

do you need to see only maximum value without any other columns like month name?

do you have some relationships in your table?

 

It should easy work in ordinar case when you create a card visual and set summarize as Max in Field settings without any additional coding

 


do not hesitate to give a kudo to useful posts and mark solutions as solution
LinkedIn

View solution in original post

2 REPLIES 2
az38
Community Champion
Community Champion

@Suna 

what kind of visual do you use?

do month names repeat in your data more than 1 time?

do you need to see only maximum value without any other columns like month name?

do you have some relationships in your table?

 

It should easy work in ordinar case when you create a card visual and set summarize as Max in Field settings without any additional coding

 


do not hesitate to give a kudo to useful posts and mark solutions as solution
LinkedIn

@az38 

 

Whoopsie, in the top N card I had left the value as sum, not as max, and that's why it summed those two months. Now I don't have to bother doing this with dax.

 

Thanks.

 

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

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

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.