Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
4 years ago
Solved

Dates error in DAX measure cannot see the error

Hi Experts

 

Not sure where the error is on the date > 31/12/2021 (not sure this working)

 

Commission Due = sum(NEWBI_COM[Payment 1]) + calculate(SUM(NEWBI_COMPS[Payment]),FILTER(NEWBI_COMPS,NEWBI_COMPS[Filter?] = "No"), filter(NEWBI_COMPS,NEWBI_COMPS[SO Posting Date] > 31/12/2021 ))

  • Hi,

    Does this measure work?

    Commission Due = sum(NEWBI_COM[Payment 1]) + calculate(SUM(NEWBI_COMPS[Payment]),NEWBI_COMPS[Filter?] = "No",NEWBI_COMPS[SO Posting Date]> DATE(2021,3,31))

4 Replies

  • Anonymous , try like

    Commission Due = sum(NEWBI_COM[Payment 1]) + calculate(SUM(NEWBI_COMPS[Payment]),FILTER(NEWBI_COMPS,NEWBI_COMPS[Filter?] = "No"), filter(NEWBI_COMPS,NEWBI_COMPS[SO Posting Date] > date(2021,12,31) ))

  • Hi,

    Does this measure work?

    Commission Due = sum(NEWBI_COM[Payment 1]) + calculate(SUM(NEWBI_COMPS[Payment]),NEWBI_COMPS[Filter?] = "No",NEWBI_COMPS[SO Posting Date]> DATE(2021,3,31))
  • Anonymous's avatar
    Anonymous
    Not applicable

    testing the measure

  • v-xiaotang's avatar
    v-xiaotang
    Icon for Community Support rankCommunity Support

    Hi Anonymous 

    will it help?

    Commission Due =
    SUM ( NEWBI_COM[Payment 1] )
        + CALCULATE (
            SUM ( NEWBI_COMPS[Payment] ),
            FILTER (
                ALL ( NEWBI_COMPS ),
                NEWBI_COMPS[Filter?] = "No"
                    && NEWBI_COMPS[SO Posting Date] > DATE ( 2021, 12, 31 )
            )
        )

     

    Best Regards,

    Community Support Team _Tang

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