Measure expressions that calc using select dim ranges
I've got two tables that are joined by a key. One table has events the other dates. The dates table is the dimension and the events table is used to calculate the measure. The measure I want to calculate is events per day. Such that, if the user selects 7 days and 7 events happened during that 7 day period the measure would be 1 event / day. The problem that I've run into is that if no events occurred until the 7th and final day my metric calculates out to 7 events per day because only one day had a corresponding record in the dates table. The first 6 days had no events and were excluded from the denominator. Here's the expression I was trying to use. max([Event Date]) - min([Event Date]) What I really need is the max(selected value from date table) - min(selected value from date table)