locked
DAX: Sum unique values across columns RRS feed

  • Question

  • Hello,

    How do I sum unique values of "Yes" across my columns in DAX?

    It should look like this with [Total Yes] being my calculated column:

    Name January February March Total Yes
    Bob Yes Yes No 2
    Jim No Yes No 1
    Mark No No Yes 1

    Thanks!

    ~UG

    Sunday, February 23, 2014 3:19 PM

Answers

  • Simply this

    =IF([January]="Yes",1,0)+IF([February]="Yes",1,0)+IF([March]="Yes",1,0)


    Please Mark This As Answer if it helps to solve the issue Visakh ---------------------------- http://visakhm.blogspot.com/ https://www.facebook.com/VmBlogs

    • Marked as answer by undergrads1 Sunday, February 23, 2014 8:06 PM
    Sunday, February 23, 2014 5:32 PM

All replies

  • Simply this

    =IF([January]="Yes",1,0)+IF([February]="Yes",1,0)+IF([March]="Yes",1,0)


    Please Mark This As Answer if it helps to solve the issue Visakh ---------------------------- http://visakhm.blogspot.com/ https://www.facebook.com/VmBlogs

    • Marked as answer by undergrads1 Sunday, February 23, 2014 8:06 PM
    Sunday, February 23, 2014 5:32 PM
  • Thank you!
    Sunday, February 23, 2014 8:07 PM