Forum Discussion
lc1
Helper III
6 years agoSum numeric values using filters
Hello, I have two columns PAR_Hours which are numeric values and PAR_Codes which are text values. I need to sum all hours for specific codes (LN, LD and DR) I tried using several versions of this f...
- 6 years ago
Hi,
Try this measure
=CALCULATE(SUM(Absenteeism[PAR_HOURS]),Absenteeism[PAR_CODE]="LN"||Absenteeism[PAR_CODE]="LD"||Absenteeism[PAR_CODE]="DR")
Hope this helps.
amitchandak
Super User
6 years agoTry
CALCULATETABLE(VALUES(Absenteeism[PAR_HOURS]),filter(Absenteeism,Absenteeism[PAR_CODE] in {"LN","LD","DR"}))
OR
CALCULATETABLE(VALUES(Absenteeism[PAR_HOURS]),filter(all(Absenteeism),Absenteeism[PAR_CODE] in {"LN","LD","DR"}))lc1
Helper III
6 years agoIt didn't work, got an error:
MdxScript (Model 8, 37)...A table of multiple values was supplied where a single value was expected.