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

Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and more. Get started

Reply
kahnailee
Advocate I
Advocate I

DAX SUMIFS equivalent **without** hardcoding criteria or slicer selection

I've tried searching forums on this and found FILTER, CALCULATE, RELATED, combo of everything and nothing appears to be working for what I'm trying to accomplish.

 

Goal: Determine total rebate dollars based on a supplier and brand, but NOT based on a hard-coded supplier or brand, nor based on a slicer selection. Well, not exclusively at least.

 

See my screenshot of example data, along with the desired output(s).

 

2019-06-11_11-00-30.jpg

 

1 ACCEPTED SOLUTION
TeigeGao
Solution Sage
Solution Sage

Hi @kahnailee ,

Please create a measure using the following query:

Rebate Dollars =
CALCULATE (
    MIN ( Table1[ExtendedPOCost] ),
    FILTER (
        ALL ( Table1 ),
        Table1[Date] = DATE ( 2019, 1, 1 )
            && Table1[Supplier] = MIN ( Table2[Supplier] )
            && Table1[Brand] = MIN ( Table2[Brand] )
    )
)
    * MIN ( Table2[Rebate] )

The result will like below:

PBIDesktop_1LQRZEir3U.png

Best Regards,

Teige

View solution in original post

1 REPLY 1
TeigeGao
Solution Sage
Solution Sage

Hi @kahnailee ,

Please create a measure using the following query:

Rebate Dollars =
CALCULATE (
    MIN ( Table1[ExtendedPOCost] ),
    FILTER (
        ALL ( Table1 ),
        Table1[Date] = DATE ( 2019, 1, 1 )
            && Table1[Supplier] = MIN ( Table2[Supplier] )
            && Table1[Brand] = MIN ( Table2[Brand] )
    )
)
    * MIN ( Table2[Rebate] )

The result will like below:

PBIDesktop_1LQRZEir3U.png

Best Regards,

Teige

Helpful resources

Announcements
Fabcon_Europe_Social_Bogo

Europe’s largest Microsoft Fabric Community Conference

Join the community in Stockholm for expert Microsoft Fabric learning including a very exciting keynote from Arun Ulag, Corporate Vice President, Azure Data.

Power BI Carousel June 2024

Power BI Monthly Update - June 2024

Check out the June 2024 Power BI update to learn about new features.

RTI Forums Carousel3

New forum boards available in Real-Time Intelligence.

Ask questions in Eventhouse and KQL, Eventstream, and Reflex.