cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
hritter Frequent Visitor
Frequent Visitor

Select an ID if it matches the value of the previous month

Hi


I need to select the ID value whenever it matches the value of the previous month. 

 

 

 

IDNameTDateCheck
333Pedro3001-01-2019 
1111Juan 3001-01-20191111
1111Diego3001-02-2019 

 

Thanks!

1 ACCEPTED SOLUTION

Accepted Solutions
hritter Frequent Visitor
Frequent Visitor

Re: Select an ID if it matches the value of the previous month

I'm sorry to be late, it's the first time I've been writing in a forum.
I was looking and found the solution

I needed to check if the current value is equal to the value of the previous month so, select the value of the previous month.

Dax

Option3 = CALCULATE (COUNT (Sheet1 [Client Code]); PREVIOUSMONTH (Sheet1 [Date]))

Select Value2 = IF ([Option3] = 1; [Select Value]; 0)
2019-03-19_17-21-04.png

Thanks!

 
2 REPLIES 2
Community Support Team
Community Support Team

Re: Select an ID if it matches the value of the previous month

Hi @hritter ,

 

I have a little confused about your scenario.

ID Name T Date Check
333 Pedro 30 01-01-2019  
1111 Juan  30 01-01-2019 1111
1111 Diego 30 01-02-2019  

 

Is the Check column your desired output?


I need to select the ID value whenever it matches the value of the previous month. 

Is this column T in sample data the value you mentioned as matched value?

 

Please explain your logic in more details. In addition, more sample data will help us understand your scenario better and get the solution quickly.

 

Best  Regards,

Cherry

Community Support Team _ Cherry Gao
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
hritter Frequent Visitor
Frequent Visitor

Re: Select an ID if it matches the value of the previous month

I'm sorry to be late, it's the first time I've been writing in a forum.
I was looking and found the solution

I needed to check if the current value is equal to the value of the previous month so, select the value of the previous month.

Dax

Option3 = CALCULATE (COUNT (Sheet1 [Client Code]); PREVIOUSMONTH (Sheet1 [Date]))

Select Value2 = IF ([Option3] = 1; [Select Value]; 0)
2019-03-19_17-21-04.png

Thanks!