Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
7 years ago
Solved

Creating custom Column based on multiple conditions and comparison

Hello there ,

 

I am looking for help, how can we create a dax expression based on multiple condition and comparison ? , below is the scenario which i wish to obtain,

so for example we have data as below:

 

IDDateSatisfactionExpectedColumn
11/1/2018SATISFIED 
11/31/2018NOT SATISFIED1
22/10/2018SATISFIED 
23/20/2018NOT SATISFIED 
24/19/2018SATISFIED 
32/10/2018SATISFIED 
44/19/2018SATISFIED 
45/20/2018SATISFIED 
46/21/2018NOT SATISFIED1
56/22/2018SATISFIED 
58/23/2018NOT SATISFIED1
68/30/2018NOT SATISFIED1
79/7/2018SATISFIED 

 

I have three columns in my Data that are ID, DATE and SATISFACTION, what i am trying to get is 4th "Expected Column" which will be calculated in this way,

lets say for ID 1, if the Value in SATISFACTION column is "NOT SATISFIED" for the Latest date in date column, then expected Column should display 1.

As we can see in ID 1, ID 4, ID 5, ID 6.

 

kindly help me out on this one please,

 

Thank you,

Regards,

Malav

2 Replies