Forum Discussion

fereshtehaghaei's avatar
1 year ago
Solved

Matrix Table Total Row and Total Column

I have the following formula that is currently looking at values in current count and subtract preveious counts and if there are any previous grads then it needs to be counted as positive so it's bei...
  • _AAndrade's avatar
    1 year ago

    Hi fereshtehaghaei,

    Please try this DAX measure:

    Attrition_Final = 
    
    VAR _Matriculated = HASONEFILTER(ContactN[Matriculated Start Term])
    VAR _TermLabel = HASONEFILTER('Term OrdinalN'[Term Label])
    
    VAR _Result =  IF( 
                        _Matriculated = FALSE() || _TermLabel = FALSE(), 
                        SUMX(
                            CROSSJOIN(
                                ALLSELECTED(ContactN[Matriculated Start Term]),
                                ALLSELECTED('Term OrdinalN'[Term Ordinal])
                            ),
                            [Attriction]
                        ), 
                        [Attriction]
                    )
    RETURN
        _Result

     

    I hope this could help you.