Forum Discussion

Power-User's avatar
Power-User
Frequent Visitor
2 years ago
Solved

Summarise

I am looking for some help to understand how to do what I think is a 3 step process using measures.

 

This is an example of 1 record in the date source

 

Date Source
IDPositive MarksNegative Marks 1Negative Marks 2Negative Marks 3
11000
11000
10100
11000
11000
10010
10010
11000
10100
10001
10001

 

This is what I am looking at summarising from the date source then use to create the finall output

 

Summarised 
IDPositive MarksNegative Marks 1Negative Marks 2Negative Marks 3Total Marks% of Positive Marks
152221145.5%

 

Count all records that are above a particular %

 

Count the number of % that are greater than 40%
 Count   
Finall Output 1   

 

Many thanks

  • Yes, sort of.  You can go easier on the filter, using TREATAS and DATESBETWEEN instead.

5 Replies

  • Unpivot your data to make it usable. Then the measure writes itself.

     

    For your second question - you don't provide enough sample data but you would do a SUMMARIZE or SUMMARIZECOLUMNS across the IDs  and then apply a filter.

    • CEllis's avatar
      CEllis
      Resolver I

      Thanks for the support.

       

      Does this look right, I am having trouble getting the dates to filter the SUM

      - Table Test =

      SUMMARIZECOLUMNS

      ('Attendance (Table)'[Primary Key],

      FILTER(('Attendance (Table)'),

       

      AND('Attendance (Table)'[Mark date]>=MIN('Academic Year (Table)'[End of week]),

        'Attendance (Table)'[Mark date]<=MAX('Academic Year (Table)'[End of week]))),

       

      "Present",SUM('Attendance (Table)'[Present]),

      "Authorised", SUM('Attendance (Table)'[Authorised Absence]),

      "UnAuthorised", SUM('Attendance (Table)'[UnAuthorised]),

      "Study", SUM('Attendance (Table)'[UnAuthorised]),

      "AEA", SUM('Attendance (Table)'[AEA])

      )

      • lbendlin's avatar
        lbendlin
        Super User

        Yes, sort of.  You can go easier on the filter, using TREATAS and DATESBETWEEN instead.