Events in Progress - Why do none of the online solutions work?

nirajkrishna

New Member
Joined
Nov 3, 2012
Messages
3
I am trying to find a count and dollar amount of events in progress when a user selects a single week. I want all events and dollars with a start date less than the max date of week selected and end date after the max date selected.

Here is my formula for the job count:

Calculate (
CountRows ( FactLeads ),
Filter (Values ( FactLeads[Start Date] ), FactLeads[Start Date] <= Max ( Calendar[Date] ) ),
Filter (Values ( FactLeads[Last Date] ), FactLeads[Last Date] >Max ( Calendar[Date] ) )
)

The problem is that if they select one week then it only uses the dates of that week for the FactLeads[Start Date]. I need it to look at all FactLeads[Start Date] and return all of them that meet both criteria.

Note: FactLeads[Start Date] and FactLeads[Last Date] have no relationships defined with any other field

If I use this formula then it returns the correct amount but it fails to filter whenever I drill down (Which is expected using ALL())

Calculate (
CountRows ( FactLeads ),
Filter (ALL( FactLeads), FactLeads[Start Date] <= Max ( Calendar[Date] ) ),
Filter (ALL( FactLeads), FactLeads[Last Date] >Max ( Calendar[Date] ) )
)

What do I need to do to my formula to get this to work right? None of the online solutions I have found make this work properly.
 

Excel Facts

Remove leading & trailing spaces
Save as CSV to remove all leading and trailing spaces. It is faster than using TRIM().
I would *think* this would work?

Calculate (
CountRows ( FactLeads ),
Filter (FactLeads, FactLeads[Start Date] <= Max ( Calendar[Date] ) ),
Filter (FactLeads, FactLeads[Last Date] >Max ( Calendar[Date] ) )
)
 
Upvote 0

Forum statistics

Threads
1,214,981
Messages
6,122,565
Members
449,089
Latest member
Motoracer88

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top