Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Earn the coveted Fabric Analytics Engineer certification. 100% off your exam for a limited time only!

Reply
Anonymous
Not applicable

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
Anonymous
Not applicable

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!

 

View solution in original post

2 REPLIES 2
v-piga-msft
Resident Rockstar
Resident Rockstar

Hi @Anonymous ,

 

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.
Anonymous
Not applicable

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!

 

Helpful resources

Announcements
April AMA free

Microsoft Fabric AMA Livestream

Join us Tuesday, April 09, 9:00 – 10:00 AM PST for a live, expert-led Q&A session on all things Microsoft Fabric!

March Fabric Community Update

Fabric Community Update - March 2024

Find out what's new and trending in the Fabric Community.