Forum Discussion

shei7141's avatar
shei7141
Icon for Helper III rankHelper III
6 years ago

measure with multiple conditions

hi all,

 

I have a table which looks like this

Project No.PhasesEstimated Start Date
1a28/08/2020
1b28/11/2020
1c28/11/2020
1d28/01/2020
2a28/01/2019
2b28/08/2019
2c28/07/2020
2d28/12/2019

 

I have a drop down box which allows users to select any project and series of slicers to allow users to change the start date by months. I am trying to write a measure which can use the edate function and do the following

For the selected project:

calculate the revised start date for the relevant phase  

For example:

if user selects Project B and want to move the start date 1 months forward

I want measure to calculate the revised start date to be "28/09/2019" 

 

I can write the nested if condition to cover all the phases. At this stage I am struggling to refer the column in the reference based on two conditions (i.e. project no. and phases)

I hope this makes sense?

I tried the following but this gives me the max date

 
Edate(CALCULATE(MAX ( Tab[StartDate] ),ALLEXCEPT ( Tab, [Project no.],Phases )),
'01 SAStDate'[SAStDate Value])
 

 

Any pointers will be greatly appreciated..

 

Shei

 

1 Reply

  • Your sample data doesn't match your description.  You say "Project B"  but you use project numbers.  Assume you meant "phase B" ?

     

    How is the user selecting Phase B? 

     

    You can easily create a modeling experience using "What If" parameters. What you cannot do is expect any persistence.  Meaning if you change the data for phase B of project 1 it will also change the date for phase B of project 2.  Power BI has no memory. There are ideas to that effect but there is no roadmap.