Forum Discussion
Status change based on a date from a different table
Hi everyone. I have the first 3 columns of this table:
and I want to add the 4th column based on this table:
Using a Measure would also work for me, if that is a better way to do it.
Any help would be very appreciated!
you can try to create a column
Column =var _ud = maxx(FILTER('Table (2)','Table'[Unit]='Table (2)'[Unit]),'Table (2)'[Upgrade Date])return if('Table'[Date]>=_ud && not(ISBLANK(_ud)),"Y")pls see the attachment below
4 Replies
- ryan_mayuSuper User
you can try to create a column
Column =var _ud = maxx(FILTER('Table (2)','Table'[Unit]='Table (2)'[Unit]),'Table (2)'[Upgrade Date])return if('Table'[Date]>=_ud && not(ISBLANK(_ud)),"Y")pls see the attachment below - AnonymousNot applicable
Hi dpcmpbll ,
Your solution is great, ryan_mayu . It worked like a charm! Here I have another idea in mind, and I would like to share it for reference.
Create a measure:
_upgraded = VAR CurrentDate = MAX('Unit'[Date]) VAR CurrentUnit = SELECTEDVALUE('Unit'[Unit]) VAR UpgradeDate = LOOKUPVALUE('Update'[Upgrade Date], 'Update'[Unit], CurrentUnit) RETURN IF( AND( NOT(ISBLANK(UpgradeDate)), CurrentDate >= UpgradeDate ), "Y", BLANK() )Or create a calculated column:
Upgraded = VAR UpgradeDate = RELATED('Update'[Upgrade Date]) RETURN IF( AND( NOT(ISBLANK(UpgradeDate)), 'Unit'[Date] >= UpgradeDate ), "Y", BLANK() )They all work very well.
pbix file is attached.
If you have any further questions please feel free to contact me.
Best Regards,
Yang
Community Support TeamIf there is any post helps, then please consider Accept it as the solution to help the other members find it more quickly.
If I misunderstand your needs or you still have problems on it, please feel free to let us know. Thanks a lot!