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

Don't miss out! 2025 Microsoft Fabric Community Conference, March 31 - April 2, Las Vegas, Nevada. Use code MSCUST for a $150 discount. Prices go up February 11th. Register now.

Reply
marami21
Frequent Visitor

SUMX and GROUPBY

Hello
I have a table that groups the sales amount by date and category. That way I can use the date and category to filter the sales amount
I want to save space deleting that table and use only one dax to get the final sales amount. Something like SUMX(GROUPBY(...)). The problem is that I can't use filters when I use that dax
Is there a way to create that dax and use filters?

Thank you,

1 ACCEPTED SOLUTION
v-alq-msft
Community Support
Community Support

Hi, @marami21 

 

Based on your description, I created data to reproduce your scenario. The pbix file is attached in the end.

Table:

b3.png

 

You may try to create a measure like below.

Result = 
SUMX(
    SUMMARIZE(
        'Table',
        'Table'[Category],
        'Table'[Date],
        "Sales",
        SUM('Table'[Sales])
    ),
    [Sales]
)

 

Result:

b1.png

 

b2.png

 

 

Best Regards

Allan

 

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

2 REPLIES 2
v-alq-msft
Community Support
Community Support

Hi, @marami21 

 

Based on your description, I created data to reproduce your scenario. The pbix file is attached in the end.

Table:

b3.png

 

You may try to create a measure like below.

Result = 
SUMX(
    SUMMARIZE(
        'Table',
        'Table'[Category],
        'Table'[Date],
        "Sales",
        SUM('Table'[Sales])
    ),
    [Sales]
)

 

Result:

b1.png

 

b2.png

 

 

Best Regards

Allan

 

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Pragati11
Super User
Super User

Hi @marami21 ,

 

Can you please share some sample data and what you are trying to achieve?

 

Thanks,

Pragati

Best Regards,

Pragati Jain


MVP logo


LinkedIn | Twitter | Blog YouTube 

Did I answer your question? Mark my post as a solution! This will help others on the forum!

Appreciate your Kudos!!

Proud to be a Super User!!

Helpful resources

Announcements
Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount! Prices go up Feb. 11th.

Feb2025 Sticker Challenge

Join our Community Sticker Challenge 2025

If you love stickers, then you will definitely want to check out our Community Sticker Challenge!

Jan25PBI_Carousel

Power BI Monthly Update - January 2025

Check out the January 2025 Power BI update to learn about new features in Reporting, Modeling, and Data Connectivity.

Jan NL Carousel

Fabric Community Update - January 2025

Find out what's new and trending in the Fabric community.