Skip to main content
Announcements
July 15, NEW Customer Portal: Initial launch will improve how you submit Support Cases. IMPORTANT DETAILS
cancel
Showing results for 
Search instead for 
Did you mean: 
shirleyc40
Creator
Creator

Measure based off another dimension's value

Hi, 

I have a list of from and to dates and I would like to create a table to show some thing like this:

FromToNumber submitted
2/24/184/20/184658
4/21/186/15/182342
6/16/188/10/188765

Where number submitted is a count if the date is between from and to. I'm not sure how I can refer to the associated From and To date from the measure

Labels (1)
12 Replies
edwin
Master II
Master II

this option preserves the dates table

 

dates:
LOAD *, From & '|' & To as Key Inline [
From, To
2/24/2018, 4/20/2018
4/21/2018, 6/15/2018
6/16/2018, 8/10/2018
8/11/2018, 10/5/2018
];

Applicant:
LOAD * INLINE [
received_date, applicantID
3/23/2018, 3343
2/28/2018, 1224
4/21/2018, 222
];

Inner Join IntervalMatch ( received_date ) 
LOAD From, To
Resident dates;

inner join (Applicant)
load 
From, To, Key
Resident dates;

drop field From, To from Applicant;

 

shirleyc40
Creator
Creator
Author

What if I needed to do this matching with more than received_date because I also have measures that look at a different date field

melissapluke
Partner - Creator
Partner - Creator

If you are creating a table with your From and To fields, add this as a measure:

melissapluke_0-1614205491184.png

melissapluke_1-1614205507492.png

=count(if(date(received_date)>date(From) and date(received_date)<=date(To),applicant_id))

I used the following sample data and it calculated correctly.

melissapluke_2-1614205546102.png