Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
5 years ago
Solved

DAX for Row level matched fields in different Columns

Dear Team,

 

I'm strucked on create a DAX for row level matched fields.

required DAX for Total(Not Consider)=Count(A+B+C+D+E)

AB              CDETotal(Not Consider)
Not ConsideredCompliantCompliant

Not

Considered

Not

Considered

3
CompliantCompliantCompliantCompliantCompliant0

Not

Considered

Compliant

Not

Considered

CompliantCompliant2

 

Advance Thanks,

I.Venkata.

  • Hi Anonymous ,

     

    Create a measure as follows for your totals:

     

    Total =
    VAR t1 = CALCULATE(COUNT(tableanme[A]), FILTER(tablename, tableanme[A] = "Not Considered"))

    VAR t2 = CALCULATE(COUNT(tableanme[B]), FILTER(tablename, tableanme[B] = "Not Considered"))

    VAR t3 = CALCULATE(COUNT(tableanme[C]), FILTER(tablename, tableanme[C] = "Not Considered"))

    VAR t4 = CALCULATE(COUNT(tableanme[D]), FILTER(tablename, tableanme[D] = "Not Considered"))

    VAR t5 = CALCULATE(COUNT(tableanme[E]), FILTER(tablename, tableanme[E] = "Not Considered"))
    RETURN

    t1+t2+t3+t4+t5

     

    Thanks,

    Pragati

2 Replies

  • Anonymous , A new measure

     

    sumx(table, if([A] ="Not Consider" ,1,0) + if([B] ="Not Consider" ,1,0)+ if([C] ="Not Consider" ,1,0)+if([D] ="Not Consider" ,1,0)+if([E] ="Not Consider" ,1,0))

     

    new column

     if([A] ="Not Consider" ,1,0) + if([B] ="Not Consider" ,1,0)+ if([C] ="Not Consider" ,1,0)+if([D] ="Not Consider" ,1,0)+if([E] ="Not Consider" ,1,0)

  • Hi Anonymous ,

     

    Create a measure as follows for your totals:

     

    Total =
    VAR t1 = CALCULATE(COUNT(tableanme[A]), FILTER(tablename, tableanme[A] = "Not Considered"))

    VAR t2 = CALCULATE(COUNT(tableanme[B]), FILTER(tablename, tableanme[B] = "Not Considered"))

    VAR t3 = CALCULATE(COUNT(tableanme[C]), FILTER(tablename, tableanme[C] = "Not Considered"))

    VAR t4 = CALCULATE(COUNT(tableanme[D]), FILTER(tablename, tableanme[D] = "Not Considered"))

    VAR t5 = CALCULATE(COUNT(tableanme[E]), FILTER(tablename, tableanme[E] = "Not Considered"))
    RETURN

    t1+t2+t3+t4+t5

     

    Thanks,

    Pragati