Hi, I am trying to add a slice for some data and I am looking for help with a formula. I have [Households] as one data source and [Meetings] as another data source. The [Households] is the parent data and the [Meetings] is ref to the [Households] as the child data.
I would like to filter the slice so it only shows Households who have not had any meetings documented in the last 180 days. Each meeting has a date field that is mandatory to be filled out. I've been trying to think of a formula for this but have not been able to come up with one. Any ideas are welcome. Thanks in advance.
Solved! Go to Solution.
What's the name of your slice ? ๐
Hello my dear.
In this situation I can imagine one scenario.
I hope I could help
I would approach this the following way.
Set up a Slice on Meetings that will have all meetings that have occured in the last 180 days. The formula to use would be [Meeting Date] + 180 >= TODAY()
Add a VC to your Households table that flags if a meeting has not occurred based on your slice. The formula to use would be NOT(IN([_THISROW].[Household Key Field], MeetingSlice[Related Household Key Field])). This will be set to TRUE if a meeting has not occurred in the last 180 days and FALSE otherwise.
Now You could make a Household slice where the filter value for your VC is set to TRUE and that will leave you with a slice that has Households that haven't had a meeting in the last 180 days.
I like that approach and think it would work. For the VC though I am having trouble with the formula. I am unsure if you are able to have a "Slice" of data included in the formula. If so any ideas how as I am unable to figure out how to link the sliced data in that VC formula.
What's the name of your slice ? ๐
I have the slice named "180 Day"
So the VC would be something like
NOT(IN([_THISROW].[Household Key Field], 180 Day[Ref Household Key Field])).
Be careful though! Tip from the Top... Don't use spaces to name your tables, slices and fields. I would much prefer your slice was called 180Day instead of 180 Day. If you MUST add some sort of separator it would be best to use an underscore. 180_Day. Field_Name. etc. If you ever attempt to lift your data to a SQL database you will have to rename all of your spaced out names and fields and underscore (_) is pretty generally used in big DBMS.
Great thanks! I thought I tried that before so maybe the space was messing it up. I changed the slice name to 180_Day and now the formula seems to work. Thanks for the advice on not using spaces or putting in an underscore instead. I appreciate the help.
That's really great to hear! I did wonder about the space and did a brief search to see if having it would mess things up. Couldn't find anything too quickly though so I assumed you would try without a space ๐
User | Count |
---|---|
25 | |
24 | |
24 | |
23 | |
16 |