# Help With Dates (Picker + Chart)

**URL:** <https://community.glideapps.com/t/help-with-dates-picker-chart/24614>\
**Category:** Ask for Help\
**Created:** [March 22, 2021, 11:28pm UTC](https://community.glideapps.com/t/help-with-dates-picker-chart/24614 "2021-03-22T23:28:11Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![Joe\_Gabriele](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/joe_gabriele/32/57595_2.png) [@Joe\_Gabriele](https://community.glideapps.com/u/Joe_Gabriele)\
**Post date:** [March 22, 2021, 11:28pm UTC](https://community.glideapps.com/t/help-with-dates-picker-chart/24614/1 "2021-03-22T23:28:11Z")

</div>

I have a performance tab, which displays the # of views a post has received Today, the Last 7 Days and the Last 30 Days in a Chart Element based on a Choice Picker.

Column 1 is Date Viewed.

Column 2, 3 and 4 are each Single Value Columns (Today, 7th Day, 30th Day).

Column 5 is an IF THEN ELSE Column which says: If Date Viewed is on or after TODAY, THEN Today. If Date Viewed is on or after 7 Days, THEN 7 Days. If Date Viewed is on or after 30 Days, THEN 30 Days.

Column 6 is the Choice Picker Column, which is User Specific.

Column 7 is a Single Value Column that uses the Choice Picker Date.

Column 8 is another IF THEN ELSE Column which says if Column 5 = Column 7, then True.

My Chart then shows all TRUE values, which is like 75% accurate.

The issue I am having is that Last 30 days excludes all posts that are also included in Last 7 days and Today because they have their respective Labels.

Ex: Post was viewed 5 times today, 15 times in the Last 7 Days and 40 times in the Last 30 Days.

What it currently displays: 5 views Today, 10 views in Last 7 Days and 25 views in the Last 30 Days.

How would I display:  
Last 30 Days = Last 30 Days (25) + Last 7 Days (10) + Today (5) = 40  
Last 7 Days = Last 7 Days (10) + Today (5) = 15  
Today = Today (5) = 5

---

<div class="post-metadata">

**Author:** ![Joe\_Gabriele](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/joe_gabriele/32/57595_2.png) [@Joe\_Gabriele](https://community.glideapps.com/u/Joe_Gabriele)\
**Post date:** [March 25, 2021, 11:20pm UTC](https://community.glideapps.com/t/help-with-dates-picker-chart/24614/2 "2021-03-25T23:20:36Z")

</div>

Here is an example of the chart in my app:

 ![image](https://us1.discourse-cdn.com/flex002/uploads/glideapps/original/3X/5/c/5ceae083762673cb6a345de22bd3a4cf59ba7718.jpeg) ![image](https://us1.discourse-cdn.com/flex002/uploads/glideapps/original/3X/9/a/9a1257dd9894b45d74b2059e2e0bf39d9744cf5b.jpeg) ![image](https://us1.discourse-cdn.com/flex002/uploads/glideapps/original/3X/2/3/23f91aaf1f71f35f048dac7fe9bf911fbbeedaac.jpeg)

The 7 Day excludes Today. And the 30 Day excludes both the 7 Day and Today.

I’d like to have 7 day include Today’s numbers and 30 Day include both the 7 Day and Today’s numbers.

---

<div class="post-metadata">

**Author:** ![ThinhDinh](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/thinhdinh/32/49_2.png) [@ThinhDinh](https://community.glideapps.com/u/ThinhDinh)\
**Post date:** [March 25, 2021, 11:26pm UTC](https://community.glideapps.com/t/help-with-dates-picker-chart/24614/3 "2021-03-25T23:26:15Z")

</div>

> [@Joe\_Gabriele](#):
>
> Column 5 is an IF THEN ELSE Column which says: If Date Viewed is on or after TODAY, THEN Today. If Date Viewed is on or after 7 Days, THEN 7 Days. If Date Viewed is on or after 30 Days, THEN 30 Days.

Because you’re labeling each type as only one, while one row would fit 2 or 3 labels. How are you populating the chart? I guess not from a relation, just by filtering?

---

<div class="post-metadata">

**Author:** ![Joe\_Gabriele](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/joe_gabriele/32/57595_2.png) [@Joe\_Gabriele](https://community.glideapps.com/u/Joe_Gabriele)\
**Post date:** [March 25, 2021, 11:44pm UTC](https://community.glideapps.com/t/help-with-dates-picker-chart/24614/4 "2021-03-25T23:44:34Z")

</div>

I have a Post Performance Sheet that populates the chart. It’s filtered based on the IfPerformance Column is True. Maybe I have to change what makes it True…

 ![image](https://us1.discourse-cdn.com/flex002/uploads/glideapps/original/3X/2/8/28b36e02716aaa0b9c74e0f8232b3c22bca4c20b.jpeg) ![image](https://us1.discourse-cdn.com/flex002/uploads/glideapps/original/3X/5/2/521a307bf42b8675576cccecd1c9c64eeb6b7ffc.jpeg) ![Screen Shot 2021-03-25 at 7.54.55 PM](https://us1.discourse-cdn.com/flex002/uploads/glideapps/original/3X/2/c/2c40cc37f68d6db0ee789fbe885c9e799913968c.png)

---

<div class="post-metadata">

**Author:** ![Darren\_Murphy](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/darren_murphy/32/47326_2.png) [@Darren\_Murphy](https://community.glideapps.com/u/Darren_Murphy)\
**Post date:** [March 26, 2021, 12:40am UTC](https://community.glideapps.com/t/help-with-dates-picker-chart/24614/5 "2021-03-26T00:40:47Z")

</div>

> [@Joe\_Gabriele](#):
>
> Column 5 is an IF THEN ELSE Column which says: If Date Viewed is on or after TODAY, THEN Today. If Date Viewed is on or after 7 Days, THEN 7 Days. If Date Viewed is on or after 30 Days, THEN 30 Days.

I think you need to split that into 3 columns. Just off the top of my head, here is how I would approach it…

- 3 separate if-then-else columns, one for each of today, 7 days, 30 days. Each column returns either `true` or blank.
- a template column with the single word `true`
- 3 multi-relation columns, each joining the template column to one of the if-then-else columns
- 3 rollup columns to get the respective counts, via the multi-relations

Haven’t tested that, but I’ve used a similar approach in other situations, so fairly confident it would work.

---

<div class="post-metadata">

**Author:** ![Darren\_Murphy](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/darren_murphy/32/47326_2.png) [@Darren\_Murphy](https://community.glideapps.com/u/Darren_Murphy)\
**Post date:** [March 26, 2021, 12:45am UTC](https://community.glideapps.com/t/help-with-dates-picker-chart/24614/6 "2021-03-26T00:45:02Z")

</div>

> [@Darren\_Murphy](#):
>
> 3 separate if-then-else columns, one for each of today, 7 days, 30 days. Each column returns either `true` or blank.

Actually, just thinking about that a bit more - you’d probably need 3 math columns to plug into those if-then-else columns. Each math column would calculate `now-1`, `now-7`, `now-30`, respectively.

---

<div class="post-metadata">

**Author:** ![Joe\_Gabriele](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/joe_gabriele/32/57595_2.png) [@Joe\_Gabriele](https://community.glideapps.com/u/Joe_Gabriele)\
**Post date:** [March 26, 2021, 12:53am UTC](https://community.glideapps.com/t/help-with-dates-picker-chart/24614/7 "2021-03-26T00:53:33Z")

</div>

Awesome, thank you I will try that tomorrow and let you know!

---

<div class="post-metadata">

**Author:** ![Joe\_Gabriele](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/joe_gabriele/32/57595_2.png) [@Joe\_Gabriele](https://community.glideapps.com/u/Joe_Gabriele)\
**Post date:** [March 26, 2021, 12:30pm UTC](https://community.glideapps.com/t/help-with-dates-picker-chart/24614/8 "2021-03-26T12:30:20Z")

</div>

I just figured it out! So my Picker creates a Single Value Column called SinglePerformance.

I added 3 IF THEN ELSE Columns:

#1. IF Date is Today, THEN Today  
#2. IF Date is Last 7 Days, THEN Last 7 Days + IF Date is Today, THEN Last 7 Days  
#3. IF Date is Last 30 Days, THEN Last 30 Days + IF Date is Last 7 Days, THEN Last 30 Days + IF Date is Today, THEN Last 30 Days

I then added a 4th IF THEN ELSE Column:

IF SinglePerformance is #1, THEN True + IF SinglePerformance is #2, THEN True + IF SinglePerformance is #3, THEN True.

I then Filtered my graph based on the 4th Column if TRUE.
