Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.
Register now!Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now
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.
| Outlet | Basepack | Month |
| O1 | B1 | Jan |
| O1 | B2 | Jan |
| O1 | B1 | Feb |
| O1 | B3 | Mar |
| O2 | B1 | Jan |
| O2 | B2 | Jan |
| O2 | B1 | Feb |
| O2 | B2 | Feb |
| O2 | B3 | Feb |
Output :
| Basepack | Count |
| B1 | 2 |
| B2 | 2 |
| B3 | 1 |
Regards
Venu
Solved! Go to Solution.
@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.
@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 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..
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
Check out the November 2025 Power BI update to learn about new features.
Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!