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

Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now

Reply
venug
Helper II
Helper II

DAX - Max value from basepack

Hi Everyone,

 

i have sample table like below one, i am going to calculate count on month. like O1B1 - 2, O1B2 - 1, O1B3 - 1, and O2B1 - 2, O2B2 - 2, O2B3 - 1.

from here i want to show max of count. B1 - 2, B2 - 2, B3 - 1.

 

I need DAX query of this scenario. 

 

OutletBasepackMonth
O1B1Jan
O1B2Jan
O1B1Feb
O1B3Mar
O2B1Jan
O2B2Jan
O2B1Feb
O2B2Feb
O2B3Feb

 

 

Output :

 

BasepackCount
B12
B22
B31

 

Regards

Venu

1 ACCEPTED SOLUTION
parry2k
Super User
Super User

@venug here is the measure for you

 

Measure 2 = MAXX ( SUMMARIZE('Table (2)', 'Table (2)'[Outlet],'Table (2)'[Basepack]), CALCULATE ( COUNTROWS ( 'Table (2)' ) ) )

 

drop BasePack and this new measure in a table visual and you will ge the result. Would appreciate Kudos 🙂 if my solution helped.



Subscribe to the @PowerBIHowTo YT channel for an upcoming video on List and Record functions in Power Query!!

Learn Power BI and Fabric - subscribe to our YT channel - Click here: @PowerBIHowTo

If my solution proved useful, I'd be delighted to receive Kudos. When you put effort into asking a question, it's equally thoughtful to acknowledge and give Kudos to the individual who helped you solve the problem. It's a small gesture that shows appreciation and encouragement! ❤


Did I answer your question? Mark my post as a solution. Proud to be a Super User! Appreciate your Kudos 🙂
Feel free to email me with any of your BI needs.

View solution in original post

4 REPLIES 4
parry2k
Super User
Super User

@venug here is the measure for you

 

Measure 2 = MAXX ( SUMMARIZE('Table (2)', 'Table (2)'[Outlet],'Table (2)'[Basepack]), CALCULATE ( COUNTROWS ( 'Table (2)' ) ) )

 

drop BasePack and this new measure in a table visual and you will ge the result. Would appreciate Kudos 🙂 if my solution helped.



Subscribe to the @PowerBIHowTo YT channel for an upcoming video on List and Record functions in Power Query!!

Learn Power BI and Fabric - subscribe to our YT channel - Click here: @PowerBIHowTo

If my solution proved useful, I'd be delighted to receive Kudos. When you put effort into asking a question, it's equally thoughtful to acknowledge and give Kudos to the individual who helped you solve the problem. It's a small gesture that shows appreciation and encouragement! ❤


Did I answer your question? Mark my post as a solution. Proud to be a Super User! Appreciate your Kudos 🙂
Feel free to email me with any of your BI needs.

 

@parry2k  thanks for soluiton,  it is working fine with different data.

 

@parry2k  thanks a lot for providing solution...

i have got solution like below sanp shot.  almost i have got correct solution, need B3 max count as 1, but it's showing as 2.

can you  please help on this..

 

Final-Result.PNG

 

Regards

Venu

 

 

 

In summarize take a distinctcount basepake. You need to give that col a name. Use that to take out your final outcome.

 

Look at my example

CALCULATE(COUNTX(filter(SUMMARIZE(Sales,'Date'[date],"s1",SUM(Sales[Sales Amount])),[s1]>120),[s1])

 

You do not need filter here.

 

Appreciate your Kudos. In case, this is the solution you are looking for, mark it as the Solution. In case it does not help, please provide additional information and mark me with @
Thanks. My Recent Blog -
https://community.powerbi.com/t5/Community-Blog/HR-Analytics-Active-Employee-Hire-and-Termination-tr...
https://community.powerbi.com/t5/Community-Blog/Power-BI-Working-with-Non-Standard-Time-Periods/ba-p...
https://community.powerbi.com/t5/Community-Blog/Comparing-Data-Across-Date-Ranges/ba-p/823601

 

 

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

Helpful resources

Announcements
November Power BI Update Carousel

Power BI Monthly Update - November 2025

Check out the November 2025 Power BI update to learn about new features.

Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

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.

Top Solution Authors
Top Kudoed Authors