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.
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.