Forum Discussion
Help with parameter
- 5 years ago
Anonymous
With this code:
WTF = SUMX(WTF, [Working Hours Total] - 'Lunch Hours'[Lunch Hours Value])See here:
Half hour lunchOne hour lunch
Works for me. Maybe you could share sample data and your pbix file.
F
Thank you Fernando,
That worked but I can't get it to work in a formula, it just keeps using the alternateresult of 0.50, even though the slider says a different value:
WTF = 'QGenda Compliance'[Worked Hours]-'Lunch Deduction Amount'[Lunch Deduction Amount Value]
Anonymous
With this code:
WTF =
SUMX(WTF, [Working Hours Total] - 'Lunch Hours'[Lunch Hours Value])See here:
Half hour lunchOne hour lunch
Works for me. Maybe you could share sample data and your pbix file.
F
- Anonymous5 years agoNot applicable
I got it working. What I did different...My Worked Hours was a Column, so I created it was a Measure (never know when to use column or measure), then I used the SUMX like you did and it worked. Thank you so much for your patience and help!
- calerof5 years agoImpactful Individual
Good to hear. Rule of thumb: Always use measures, never use calculated columns. Unless it's completely necessary.
😉
F
- Anonymous5 years agoNot applicable
Thank you, I am going to go back and change my calculated columns into measures.
Maybe I should open a new thread on this, but can you use IF statements in Measures? This is my formula in a column now, and trying to put in a measure, but it's not allowing me to pick that first field name (tagname):
Extra Pay Hours = IF('QGenda Compliance'[TagName] IN {"Shift: Specialty Shift", "Shift: Additional Shift", "Call: Specialty (Beeper)", "Call: Beeper", "PTO Buy-Back"}, 'QGenda Compliance'[Worked Hours], 0)