Forum Discussion

aflintdepm's avatar
aflintdepm
Helper III
2 years ago
Solved

Getting a SUM in a Matrix

I have a set of data that I have to trend by date.  The data is formatted as follows:

DateVisit TypeTotal Completed
5/24/24New4
5/24/24Follow-Up3
5/24/24Discharge1
5/25/24New3
5/25/24Follow-Up2
5/25/24Discharge2

 

The "Total Completed" column is already a total, so I don't need to do any calculations on this value individually.

 

My desired output is a matrix that looks like this:

Visit Type5/24/245/25/24Total
New437
Follow-Up325
Discharge123

 

I wrote the following measure as my starting point:
Visits by Type = CALCULATE(SUM('Table1'[Total Completed]), ALLEXCEPT('Table1','Table1'[Visit Type]))

 

When I do this, my output looks like this:

Visit Type5/24/245/25/24Total
New777
Follow-Up555
Discharge333

 

What am I missing to get the values to distribute by day and only sum for the total?

 

Thank you for your help.

  • aflintdepm would it be fine if you used matrix visual?
    It would return desired output, without any dax calculation. Correct me if i misunderstood the issue.


    Cheers,
    Nemanja Andic

2 Replies

  • nandic's avatar
    nandic
    Resident Rockstar

    aflintdepm would it be fine if you used matrix visual?
    It would return desired output, without any dax calculation. Correct me if i misunderstood the issue.


    Cheers,
    Nemanja Andic

    • aflintdepm's avatar
      aflintdepm
      Helper III

      nandic  That's what I was expecting to be able to do, but for some reason, the matrix would now allow me to select sum- it kept forcing count or distinct count.  This morning when I re-opened the workbook file, SUM was an available option.  Guess it was just glitchy.  Thank you for your help!