Forum Discussion
Anonymous
7 years agoNot applicable
Active Clients
I have a date when client started to work with the company, and date when he finished/terminated. I need to calculate what was total number of active clients in any given moment, First goal to see b...
- 7 years ago
Hi Anonymous
Create a calendar date table in Editor Queries,
Create a blank query->open advanced editor, paste the following code
let Source = List.Dates(#date(2018, 1, 1),365, #duration(1, 0, 0, 0)), #"Converted to Table" = Table.FromList(Source, Splitter.SplitByNothing(), null, null, ExtraValues.Error), #"Renamed Columns" = Table.RenameColumns(#"Converted to Table",{{"Column1", "date"}}) in #"Renamed Columns"close &&apply,
create relationship between calendar table and your data table (called "Sheet1" in my test) based on "Sheet1"[start date] <->"calendar"[date]
create a measure in Sheet1,
no_count = CALCULATE ( COUNT ( Sheet1[client] ), FILTER ( ALL ( Sheet1 ), [start date] <= MAX ( 'calendar'[date] ) && [end date] >= MAX ( 'calendar'[date] ) ) )add "calendar"[date] in the Axis, measure in the value field
Best Regards
Maggie
Ashish_Mathur
7 years agoSuper User
Hi,
Share some data and show the expected result.
Anonymous
7 years agoNot applicable
Ashish_Mathur hi I make a example above, please see file (url to dropbox)
- Ashish_Mathur7 years agoSuper User
Hi,
I do not see any URL to download your Excel file.