Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
7 years ago

Using Parameter to Push Demand Forwards X Days

Hey, 

 

I have three tables called Projects, Demand and DateProject and Demand are connected through ProjectID and Demand and Date are connected through date. Currently I have a report where I can see sum of demand hours for each project for selected days. The problem is that sometimes projects get delayd, meaning for example that no work can be done for a month, and the required resourced demand will move forwards one month. 

 

I have used what-if parameters before, and managed to create a slicer, which allows the user to choose a project, and adjust the total demand for the project. What I've recently been trying to do is to allow the user to choose a project and for example move the demand forwards one month, like you can see below. 

 

Current demand

Project Name         January          February           March

Project X                  100h               100h                 50h

Project Y                   50h                 50h                  100h

Project Z                   100h               100h                 0h

 

Demand after Project Y and Project Z have been delayd by one month

Project Name         January          February           March

Project X                  100h               100h                 50h

Project Y                   0h                  100h                 100h

Project Z                   100h               0h                    100h

 

How should I start working on this? 

 

I have tried creating a new measure that changes the date in Demand table using the following:

Adjusted_TimeByDay =
IF (
SELECTEDVALUE ( slicer_project[slicer_project] ) = MAX(Projects[Project Name]),
DATEADD(Demand[TimeByDay],Parameter[Parameter Value],DAY), DATEADD(Demand[TimeByDay],0,DAY)
)
The slicer_project is a copy of the Projects table and project names, and I've been using that to choose the project which I want to delay. 

2 Replies

  • v-piga-msft's avatar
    v-piga-msft
    Resident Rockstar

    Hi Anonymous ,

    To understand your scenario better, please share the data sample which could reproduce your scenario and your desired output so that we could help further on it.

    Or, ideally, share the pbix (beware of confidential data).

    Best  Regards,

    Cherry