cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
anwilkins
Resolver I
Resolver I

Seeking Date Greater than the previous date

Question is:
 
Why does this conditional column:

SCIndicator = if (MIN('MERGE_BillingSUMMARY'[SessionCodes]) > ('MERGE_BillingSUMMARY'[CCA]) ,1,0 )
 
Produce this results:
 Where the first two SessionCodes (10/4/2017 and 10/11/2017) are clearly not > 10/17/2017.
Patient Internal IdCCASCIndicatorSessionCodes
185763 1 
185763 110/4/2017 0:00
185763 110/11/2017 0:00
185763 111/1/2017 0:00
185763 111/28/2017 0:00
185763 112/11/2017 0:00
185763 11/16/2018 0:00
185763 11/29/2018 0:00
185763 12/26/2018 0:00
185763 13/7/2018 0:00
185763 13/21/2018 0:00
185763 14/10/2018 0:00
185763 14/25/2018 0:00
18576310/17/2017 0:000 
1 ACCEPTED SOLUTION
amitchandak
Super User
Super User

@anwilkins , Try a new column like

 

Column =

var _min = minx(filter(Table, [Patient Internal Id] =earlier([Patient Internal Id]) && not(isblank([CCA])) ),[CCA])

return

if ('MERGE_BillingSUMMARY'[SessionCodes] >_min ,1,0 )

Did I answer your question? Mark my post as a solution! Appreciate your Kudos!! !!
Dashboard of My Blogs !! Connect on Linkedin
Want To Learn Power BI
Learn Power BI Beginners !! Advance Power BI Concepts !! Power BI For Tableau User !! Learn Power BI in Hindi !!
Proud to be a Super User!
!! Subscribe to my youtube Channel !!

View solution in original post

2 REPLIES 2
amitchandak
Super User
Super User

@anwilkins , Try a new column like

 

Column =

var _min = minx(filter(Table, [Patient Internal Id] =earlier([Patient Internal Id]) && not(isblank([CCA])) ),[CCA])

return

if ('MERGE_BillingSUMMARY'[SessionCodes] >_min ,1,0 )

Did I answer your question? Mark my post as a solution! Appreciate your Kudos!! !!
Dashboard of My Blogs !! Connect on Linkedin
Want To Learn Power BI
Learn Power BI Beginners !! Advance Power BI Concepts !! Power BI For Tableau User !! Learn Power BI in Hindi !!
Proud to be a Super User!
!! Subscribe to my youtube Channel !!

Hey Amitchandak, I had to do a bit more configuration but yes...this did get me the first date, now I need the second date. If you will refer to this link, you will see the entire request in a different post.

Pull the next sequential service date that use spe... - Microsoft Power BI Community

Helpful resources

Announcements
Microsoft Build 768x460.png

Microsoft Build is May 24-26. Have you registered yet?

Come together to explore latest innovations in code and application development—and gain insights from experts from around the world.

May 23 2022 epsiode 5 without aka link.jpg

The Power BI Community Show

Welcome to the Power BI Community Show! Jeroen ter Heerdt talks about the importance of Data Modeling.

Power BI Dev Camp Session 22 with aka link 768x460.jpg

Check it out!

Mark your calendars and join us on Thursday, May 26 at 11a PDT for a great session with Ted Pattison!

charticulator_carousel_with_text (1).png

Charticulator Design Challenge

Put your data visualization and design skills to the test! This exciting challenge is happening now through May 31st!