Forum Discussion
How to Assign text value based on dates while the date variable are in 2 different tables
I have 2 tables. Table1 for campaign monitoring which have date_monitored
Table 2: is for campaign calendar - it has Campaign_start_date, Campaign_end_date, Monitoring_start_date and Monitoring_end_date.
Monitoring done during campaign is considered as inprocess and after campaign end date its called EndProcess
My measure below is meant to Assign the type of monitoring based on dates when monitoring was done. Am however am getting error. I need guidance
Type IM = if(MIN('4344_Household Monitoring'[date_monitored])>=MIN('SIAS calendar'[SIAs Start Date]) && MIN('4344_Household Monitoring'[date_monitored])<=MIN('SIAS calendar'[SIAs End Date]),"Inprocess", if(MIN('4344_Household Monitoring'[date_monitored])>=MIN('SIAS calendar'[IM start Date]) && MIN('4344_Household Monitoring'[date_monitored])>=MIN('SIAS calendar'[IM End Date]),"End_process","ERROR"))
16 Replies
- gathenjicFrequent Visitor
MFelix Thanks for getting intouch to SOLVE
How to I attached the .pbix file?
Below is how my table structure looks
Table 1: HH-Monitoring - This is the data collection form. Activities are monitored as they happen (Inprocess) and after completion (End_process)
Province1 District2 07/02/2020 Province1 District2 08/02/2020 Province1 District2 09/02/2020 Province1 District2 10/02/2020 Activity Calendar: Showing dates when Activity started and Ended (inprocess) and dates of post campaign activities
Region District Response_Type Activity_Start_Date Activity_End_Date Post_start_Date Post_End_Date Province1 District1 Round 1 07/02/2020 11/02/2020 12/02/2020 15/02/2020 Province1 District2 Round 1 07/02/2020 11/02/2020 12/02/2020 15/02/2020 Province1 District3 Round 1 07/02/2020 11/02/2020 12/02/2020 15/02/2020 Province1 District4 Round 1 07/02/2020 11/02/2020 12/02/2020 15/02/2020 Province5 District5 Round 1 07/02/2020 11/02/2020 12/02/2020 15/02/2020 Province6 District6 Round 1 07/02/2020 11/02/2020 12/02/2020 15/02/2020 Province6 District7 Round 1 07/02/2020 11/02/2020 12/02/2020 15/02/2020 Province1 District1 Round 2 14/03/2020 18/03/2020 20/03/2020 25/03/2020 Province1 District2 Round 2 14/03/2020 18/03/2020 20/03/2020 25/03/2020 Province1 District3 Round 2 14/03/2020 18/03/2020 20/03/2020 25/03/2020
Table 3: List of districts for table relationships purpose
PROVINCE DISTRICT Province1 District1 Province1 District2 Province1 District3 Province1 District4 Province5 District5 Province6 District6 Province6 District7
Expectation: To use look at the date of Monitoring against the SIAs calendar and classfy as inprocess, end process otherwise if not within those dates its test data for training- v-gizhi-msftCommunity Support
Hi,
Could you please tell me that why the column in your formula such as [SIAs Start Date] or [SIAs End Date]does not exist in your sample table?
Please share the expected result as a screenshot for me to help you further.
You can share your pbix file by OneDrive for Business if convenient.
And remember to remove any sensitive data.
Thanks.
Best Regards,
Giotto Zhi