Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
7 years ago

DAX formula help

Hi All - I need help with the formulas to produce the results in the last column below. Essentially, I need to calculate the count of weeks for each participant where s/he attended at least 3 days for at least 60 combined mins per day where:

 

Attended_c = Attended

Fitness_Rollup = Fitness

Attendance Week = >=22

 

In the sample data for Mitch below, the result should be 1 (week 28).

 

NameDateAttended__cTime_Spent_ActivityNameAttendance WeekFitness_RollupCount of Weeks with 3 or more distinct days of 60+mins 
MitchWednesday, November 28, 2018Attended607th Grade Nutrition #322 1
MitchMonday, December 03, 2018Attended607th Grade Nutrition #423 1
MitchWednesday, January 09, 2019Attended607th Grade Nutrition #128 1
MitchThursday, November 29, 2018Attended240General Attendance22 1
MitchMonday, December 03, 2018Attended240General Attendance23 1
MitchTuesday, December 04, 2018Attended240General Attendance23 1
MitchWednesday, December 05, 2018Attended240General Attendance23 1
MitchThursday, November 01, 2018 240General Attendance18 1
MitchFriday, November 02, 2018 60Zumba18Fitness1
MitchMonday, November 05, 2018 60Zumba19Fitness1
MitchFriday, November 30, 2018Attended180General Attendance22 1
MitchTuesday, November 27, 2018Attended60Math Enrichment22 1
MitchTuesday, December 04, 2018Attended60Math Enrichment23 1
MitchTuesday, November 20, 2018Attended60Fitness21Fitness1
MitchMonday, November 26, 2018Attended60Fitness22Fitness1
MitchTuesday, November 27, 2018Attended60Fitness22Fitness1
MitchMonday, December 03, 2018Attended60Fitness23Fitness1
MitchWednesday, December 05, 2018Attended60Fitness23Fitness1
MitchThursday, January 10, 2019Attended30Basketball28Fitness1
MitchTuesday, January 08, 2019Attended60Fitness28Fitness1
MitchWednesday, January 09, 2019Attended60Fitness28Fitness1
MitchThursday, January 10, 2019Attended30Fitness28Fitness1
MitchMonday, January 14, 2019Attended60Fitness29Fitness1
MitchMonday, November 19, 2018Attended60Basketball21Fitness1

4 Replies

  • Hi,

     

    Should that be a calculated column formula or a measure?  If it has to be a measure, then share the link from where i can download your PBI file.

      • Ashish_Mathur's avatar
        Ashish_Mathur
        Super User

        Hi,

         

        I tried but could not get the correct answer using a calculated column formula.

  • Anonymous's avatar
    Anonymous
    Not applicable

    Can anyone help with this?