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
Good to hear. Rule of thumb: Always use measures, never use calculated columns. Unless it's completely necessary.
😉
F
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)
- daxer-almighty5 years agoSolution Sage
Anonymous
You should not use calculated columns unless you don't have ANY OTHER CHOICE. However, turning calculated columns into measures is not always a good decision. Please note that a calculated column can be used in slicers, whereas measures can't. If you need a column, then the best solution by far is to calculate it in Power Query.