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

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.

Reply
Syndicate_Admin
Administrator
Administrator

Group data with DAX

Hello good morning,

I would like to know if with DAX you can do a grouping of values as you would in Power Query with the grouping itself (I ask this because I can't edit Power Query queries), or if there is some other way to do the following:

I get a table with the data of the promotions of the products where each row is a date and in a field of the table indicates the number of promotions it had, with that I have to put a card that indicates the product that has more promotions considering the criteria that are filtered (there are five segmenters that filter by date, product, etc.), I thought to create a grouping of data possibly in a table created with DAX where I place the codes of the products and the total sum of promotions they had and later with the MAX function get the one with the most promotions, if you could help me by indicating if it is possible or if there is another way to achieve this, the end result should be only a value that is placed on a card.

The data arrives like this;

GerardContlx_0-1641270238274.png

You want to get something similar to this but with DAX.

GerardContlx_1-1641270285276.png

To get the maximum value and present it on a card.

GerardContlx_2-1641270404823.png

With what you can help me I thank you in advance.

1 ACCEPTED SOLUTION
amitchandak
Super User
Super User

@Syndicate_Admin , a measure like this can help

maxx(summarize(Table, Table[mater_product_id], "_sum", sum(Table[num_promos])), [_sum])

 

You can create a table if needed using summarize or summarizecolumns

 

summarize(Table, Table[mater_product_id], "_sum", sum(Table[num_promos]))

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

View solution in original post

2 REPLIES 2
amitchandak
Super User
Super User

@Syndicate_Admin , a measure like this can help

maxx(summarize(Table, Table[mater_product_id], "_sum", sum(Table[num_promos])), [_sum])

 

You can create a table if needed using summarize or summarizecolumns

 

summarize(Table, Table[mater_product_id], "_sum", sum(Table[num_promos]))

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

I thank you for your answer, sorry if the question is very basic but I am very new, one more doubt I would have is if that calculation is affected by a date slicer.

Helpful resources

Announcements
FabCon Global Hackathon Carousel

FabCon Global Hackathon

Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes!

October Power BI Update Carousel

Power BI Monthly Update - October 2025

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

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.