Forum Discussion
RonaldvdH
Post Patron
3 years agoWhat's wrong with my formula
Hey guys, I need help in fixing my formula. Basically I have a table which contains Forecast hours and Spend hours. When the Spend Hours has a value it overrules the Forecast Hours. I want to ca...
tt_and
Advocate I
3 years agoOh, sorry. With max() around selectedvalue it should work?
- RonaldvdH3 years ago
Post Patron
I've made the changes you suggested but still I get an error
the function MAX only accepts a columnreference as argument
Test2 = var cal = SUMX(FILTER(ALL('FC Uren'),'FC Uren'[Geboekte uren]=0),'FC Uren'[Forecast uren]) var act = SUMX(FILTER(ALL('FC Uren'),'FC Uren'[Geboekte uren]<>0),'FC Uren'[Geboekte uren]) var dev = 1+IF((SELECTEDVALUE('FC Uren'[Geboekte uren])*1)>0,(act-cal)/cal,0) return IF([Totaal geboekte uren]<>0, dev*MAX(SELECTEDVALUE('FC Uren'[Forecast uren])))