Forum Discussion
Excel to DAX: converting SUMIFS structured references ([column1],[@[column1])
- 4 years ago
Unimatrix8472 you misplaced a parenthesus
allexcept('Raw Course Success Data - AY','Raw Course Success Data - AY'[Department], 'Raw Course Success Data - AY'[Year Term])
Sure, here is a simplifed illustration.
Excel Expression:
Calculated Values =SUMIFS([Course Enrollment],[Department],[@Department],[Year Term],[@[Year Term]])
The expression calculates the enrollment sum across courses for a given department in a given year. I am trying to accomplish the same with DAX in Power BI.
Example: Department A in Fall 2021 saw a total enrollment of 550 students (200+300+50), whereas Department E in Spring 2020 saw a total enrollment of 151 (74+77).
Does this help?
Unimatrix8472 try this measure
sumifEquivalent=calculate(sum(tbl[courseEnrollment]), allexcept(tbl,tbl[Department]),tbl[YearTerm]))
- Unimatrix84724 years agoNew Member
Here's the implementation of your suggestion with my actual DAX:
Dept Enrl Per AY = calculate(sum('Raw Course Success Data - AY'[Course Enrollment]), allexcept('Raw Course Success Data - AY','Raw Course Success Data - AY'[Department]),'Raw Course Success Data - AY'[Year Term])The following error occured: Cannot covert 'Summer 2016' of type Text to type True/False.Summer 2016 is a [Year Term] value, like Fall 2021 or Spring 2020 in the example I provided in my previous reply.Suggestions?- smpa014 years ago
Community Champion
Unimatrix8472 you misplaced a parenthesus
allexcept('Raw Course Success Data - AY','Raw Course Success Data - AY'[Department], 'Raw Course Success Data - AY'[Year Term])
- Unimatrix84724 years agoNew Member
Oops. Yes, this appears to have worked. Thank you very much!