Forum Discussion
RonaldvdH
6 years agoPost Patron
Help me please ;)
I need to upgrade my current measure to include a variable
Cumulatieve HC geforecast =
CALCULATE ([Totaal geforecast aantal HC];
FILTER(
ALL('Forecast FttH');
'Forecast FttH'[Week]<=MAX('Forecast FttH'[Week])
))
In the table it measures a total value but in this table are two different projects, Project A and Project B and i need this formula to work with this variable.
Ive already tried to add and AND variable to the formula but that doesn't work. The table has the data in this format
Project Weeknr Forecast activity A Forecast activity B
Project A 2020-02 200 100
Project A 2020-03 200 100
Project B 2020-02 300 50
Project B 2020-03 300 50
Project A 2020-04 100 200
Project B 2020-04 200 150
The measure should take in account that there are 2 projects to calculate and not just 1 and maybe i need a new table to combine data or results of a formula but im not sure so i hope you guys can help me out here
When i use a Slicer and select Project A the measure should only measure based on Project A and not combine Project A and B but i think its because the formula above doesn't have the variable in it to differentiate between projects
Does anyone understand what im talking about or do you need more info
9 Replies
- az38Community Champion
Hi RonaldvdH
maybe this will help:
Cumulatieve HC geforecast = CALCULATE ([Totaal geforecast aantal HC]; FILTER( ALL('Forecast FttH'); 'Forecast FttH'[Week]<=MAX('Forecast FttH'[Week]) && 'Forecast FttH'[Project] = SELECTEDVALUE('Forecast FttH'[Project]) ))do not hesitate to give a kudo to useful posts and mark solutions as solution
- RonaldvdHPost Patron
az38 thanks for your quick response and it looks like it works but i need to examine your solution further.
What i can see is that is works fine when i select just 1 project but when i select both the measure doesn't seem to work
or in the very least the result is very strange
Any ideas ?