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

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
Anonymous
Not applicable

Maximum of Count

Hello, I am new to power bi. I am facing a problem. I want to creforum.PNGate a new column as "Highest Target Quantity" which shows for Jan 1st Highest Target Quantity achieved as 2 and for Jan 2 Highest Target Quantity achieved as 3, based on the Max Count column. 

2 ACCEPTED SOLUTIONS

Hi @Anonymous,

 

One sample for your reference. Here we can create two measures as below to get the result as we need.

 

MAX = CALCULATE(COUNTROWS(Table1),ALLEXCEPT(Table1,Table1[DATE]),VALUES(Table1[ITEM]))
MAXX = MAXX(Table1,[MAX])

Capture.PNG

 

For more details, please check the pbix as attached.

 

Regards,

Frank

Community Support Team _ Frank
If this post helps, then please consider Accept it as the solution to help the others find it more quickly.

View solution in original post

Hi @Anonymous,

 

To create another new measure and make the table visual filterd by the measure.

 

Measure = var result = MAXX(ALLEXCEPT(Table1,Table1[DATE]),[MAXX])
return
IF([MAX]=result,1,0)

2.PNG

 

Regards,

Frank

Community Support Team _ Frank
If this post helps, then please consider Accept it as the solution to help the others find it more quickly.

View solution in original post

9 REPLIES 9
Ashish_Mathur
Super User
Super User

Hi,

 

Try this calculated column formula

 

=CALCULATE(MAX(Data[Max Count]),FILTER(Data,Data[Month]=EARLIER(Data[Month])&&Data[Day]=EARLIER(Data[Day])))

 

Hope this helps.


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

If you include Month and Day in your visual then you should just need a measure that is essentially:

 

Measure = MAX([Max COUNT])



Follow on LinkedIn
@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
DAX For Humans

DAX is easy, CALCULATE makes DAX hard...
Anonymous
Not applicable

F1.PNG

Hello Greg, thank you for your time to reply to my issue. But I think I dint explain the problem clearly. The image attached is the file which needed to be solved. In the final output colum I want to get the Maximum Count for each date. Example : For Jan1 its team 3 with 2 count and for Jan 2 its team 2 with 3 count. If I use = Max([Count]) , it gives the output in visualization as 1 for all rows.

 

So I want the final output as Jan 1 Highest count as 2 and for Jan 2 as 3.

Hi @Anonymous,

 

One sample for your reference. Here we can create two measures as below to get the result as we need.

 

MAX = CALCULATE(COUNTROWS(Table1),ALLEXCEPT(Table1,Table1[DATE]),VALUES(Table1[ITEM]))
MAXX = MAXX(Table1,[MAX])

Capture.PNG

 

For more details, please check the pbix as attached.

 

Regards,

Frank

Community Support Team _ Frank
If this post helps, then please consider Accept it as the solution to help the others find it more quickly.
Anonymous
Not applicable

 

 

Hi @Anonymous,

 

To create another new measure and make the table visual filterd by the measure.

 

Measure = var result = MAXX(ALLEXCEPT(Table1,Table1[DATE]),[MAXX])
return
IF([MAX]=result,1,0)

2.PNG

 

Regards,

Frank

Community Support Team _ Frank
If this post helps, then please consider Accept it as the solution to help the others find it more quickly.

@Anonymous

 

Do you want to create a measure or column?

 

If you want to create a measure

 

maxcount = MAX(Table5[count])

c1.JPG

 

 

if you want to create a column

 

maxcount2 = MAXX(FILTER(Table5,'Table5'[date]=EARLIER(Table5[date])),Table5[count])

c1.JPG

 

 

 

1





Did I answer your question? Mark my post as a solution!

Proud to be a Super User!




Anonymous
Not applicable

Hello Ryan, 

Thank you for your time to reply to my issue. I would like to know how you created the "count" column? It looks like a summarized table ,compared to my Count column which has only "1" in all the row values.

@Anonymous

 

I just create a new column. I also attached the DAX. You can have a try on your end. Thnaks

 

maxcount2 = MAXX(FILTER(Table5,'Table5'[date]=EARLIER(Table5[date])),Table5[count])





Did I answer your question? Mark my post as a solution!

Proud to be a Super User!




Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

December 2025 Power BI Update Carousel

Power BI Monthly Update - December 2025

Check out the December 2025 Power BI Holiday Recap!

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.