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
nj-matt
Helper I
Helper I

Help with ALLSELECTED by specific column summarized

I think there is a solve somewhere I am not thinking, but here is what I am trying to accomplish using the ALLSELECTED dax to summarize total sales -->

 

CustomerProductSalesTotal Sales
Drug StoreCandy Bars100400
Grocery StoreCandy Bars100400
Mass MerchGum100400
C-StoreCookies100400

 

Here is what I want, alway summarized dynamically by product -->

 

CustomerProductSalesTotal Sales
Drug StoreCandy Bars100200
Grocery StoreCandy Bars100200
Mass MerchGum100100
C-StoreCookies100100

 

I need it to be dynamic since other filters will routinely by applied (year, class of trade) but for that total sales column I need always at the parent product level. Is it possible withinnthe dax formula or do I need a new table?

1 ACCEPTED SOLUTION
MohammadLoran25
Solution Sage
Solution Sage

Hi @nj-matt ,

Try this:

Measuree =
CALCULATE (
    SUM ( CustomerProductSales[Sales] ),
    FILTER (
        ALLSELECTED ( CustomerProductSales ),
        CustomerProductSales[Product] = SELECTEDVALUE ( CustomerProductSales[Product] )
    )
)

 

It helped? Mark it as an accepted solution.

Regards,

Loran

View solution in original post

5 REPLIES 5
MohammadLoran25
Solution Sage
Solution Sage

Hi @nj-matt ,

Try this:

Measuree =
CALCULATE (
    SUM ( CustomerProductSales[Sales] ),
    FILTER (
        ALLSELECTED ( CustomerProductSales ),
        CustomerProductSales[Product] = SELECTEDVALUE ( CustomerProductSales[Product] )
    )
)

 

It helped? Mark it as an accepted solution.

Regards,

Loran

i want to filter the summarized table when i filter table2{2} by sliceer i.e. by choosing sent or received in the slicer i want my table to be filtered and updated below is the ocde 

qty_sent_MonthlyAggregation =
VAR currentwn = ALLSELECTED('Table2 (2)'[Sent])


RETURN
SUMMARIZE(
   'Table2 (2)'
   ,
    'Table2 (2)'[Company ],
    'Table2 (2)'[MonthName],
    "TotalQty", CALCULATE(SUM('Table2 (2)'[QTY]),FILTER('Table2 (2)','Table2 (2)'[Sent] IN currentwn)))


Hi can somebody please help

I'm sorry for the spelling mistakes

Success! Thanks so much, I knew it had to be something simple

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.