Forum Discussion
electrobrit
3 years agoPost Patron
conditional statement by name for weekly totals
I am trying to get total available hours by week which is usually 40 but one person works 20.
In trying to get this in the table by person by week
Is there a conditional statement I can use?
if name is John then 5*4, else 5*8
I've tried a few thing (like this below) and when I add to table with dates by week and names of everyone, I get 87160 instead of 20 for john and 40 for everyone else. Any ideas?
Column = SUMX('-AvailHours', SWITCH(TRUE(),
'-AvailHours'[narrative_full_name]="John", 5*4,8*4))
- Anonymous3 years ago
2 Replies
- AnonymousNot applicable
- Dinesh_SurangaContinued Contributor
Hi,
Use following DAX formula.
Column = IF(SELECTEDVALUE(-AvailHours[narrative_full_name]) = "John", 5*4,5*8)If it works, Please accept it as solution.Thank you.