6 Replies Latest reply on Jan 1, 2019 7:01 AM by Norbert Maijoor

# Multiple Date Ranges with several measures in Same Worksheet

HI!

I@ trying to create a one table with multiple measures and multiple date (yesterday, last 7 days , last 30 days)

attached a screenshot of what we want in the end

Any suggestions on a calculation that I can build to help mw achieve this?

I Have attached an example of a workbook.

Joe Oppelt - I saw that you resolved a lot of problems , maybe you can help also here

Thanks,

Dor

• ###### 1. Re: Multiple Date Ranges with several measures in Same Worksheet

HI Dor,

Regards,

Norbert

• ###### 2. Re: Multiple Date Ranges with several measures in Same Worksheet

Hi Dor,

Please find my approach based on UNION as reference below and stored in attached workbook version 10.5 located in the original thread.

Just dropped Date in the rows for the "proof of the pudding". You can remove it and bring in your ID name;)

1. Define a UNION

if ([Table Name]='Sheet1' and datediff('day',[Date],today())=1) then 'Yesterday'

elseif ([Table Name]='Sheet1\$' and datediff('day',[Date],today())<=7

and datediff('day',[Date],today())>=1) then 'Last 7 days'

elseif ([Table Name]='Sheet11' and datediff('day',[Date],today())<=30

and  datediff('day',[Date],today())>=1) then 'Last 30 days'

END

3. Drag the required objects to the indicated locations (Date -> ID name) and filter D1. Header Exclude NULL

Hope it is sufficient,

Regards,

Norbert

• ###### 3. Re: Multiple Date Ranges with several measures in Same Worksheet

Hi Norbert,

Attached

• ###### 4. Re: Multiple Date Ranges with several measures in Same Worksheet

Hi Dor,

Find attached

Hope it is sufficient.

Regards,

Norbert

• ###### 5. Re: Multiple Date Ranges with several measures in Same Worksheet

Hi Norbert ,

Thanks!

You are my hero !

Best,

Dor

• ###### 6. Re: Multiple Date Ranges with several measures in Same Worksheet

Hi Dor,

You are welcome.

Glad it worked out for you & thanks for the "Badge". Appreciated!:)

Regards,

Norbert