Forum Discussion

NSSLynne's avatar
NSSLynne
Regular Visitor
2 years ago
Solved

Multiple filters in DAX

Spec3£1 = calculate(     SUMX('POD Report',[3. Spec Price]), FILTER('POD Report','POD Report'[Site Attended?] = "Site attended but no work carried out - Customer Fault") || ('POD Report'[Site Att...
  • rsbin's avatar
    2 years ago

    NSSLynne ,

    Believe your syntax for using SUMX is incorrect.  Please try this:

    Spec3£1 = 
        SUMX( FILTER('POD Report','POD Report'[Site Attended?] = "Site attended but no work carried out - Customer Fault" || ('POD Report'[Site Attended?] = "Yes" && 'POD Report'[3. Spec Done?] = "Yes")),
        [3. Spec Price] )

    Or I think you can simply use SUM:

    Spec3£1_SUM = CALCULATE(
        SUM( 'POD Report'[3. Spec Price]),
        FILTER('POD Report','POD Report'[Site Attended?] = "Site attended but no work carried out - Customer Fault" || ('POD Report'[Site Attended?] = "Yes" && 'POD Report'[3. Spec Done?] = "Yes")))

    to perhaps achieve the same result.

    Hope one of these provides a solution to your issue:

    Regards,