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
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
Super User
Super User

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

 

Measure = MAX([Max COUNT])


@ 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!:
The Definitive Guide to Power Query (M)

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
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.