0

I am trying to use Set Analysis in the table below for the column labelled test. I am trying to get sum([Best Dollar]) for the date range specified by the Start and End columns.

This expression returns results, but it's naturally static for each row of the table:

=sum({$<AsAtDate={">=40959 and <=40960"}>} [Best Dollar])/1000 

This is what I want to have but it returns 0:

=Sum({$<AsAtDate={">=(num(floor(BroadcastWeekStart2))) and <=(num(floor(BroadcastWeekStart2)))+6"}>} [Best Dollar])/1000 

To obtain unique start date serial numbers for each line for the start column (BroadcastWeekStart2) I use the following expression:

=(num(floor(BroadcastWeekStart2)))

How can I specify that the values or calculations used for the start and end columns are used in Set Analysis for the field above?

1 Answer 1

0

There is at least one information missing in your question.

Do you want to select on fixed values or should the sum depend on the current time?

For the static version something like

=sum( {$<BroadcastWeekStart2={"40959"}, BroadcastWeekStart2={"<=40960"}>} [Best Dollar])/1000

should work. (Assuming that BroadcastWeekStart2 contains these kind of values.)

Let me show you an example how I calculate values for the current week:

='Count: ' & count({$<start_week={"$(=WeekStart(Today()))"}>} Games)

where the start_week is set in the load script by:

WeekStart(date#(@4, 'YYYYMMDD')) as start_week,

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.