Forum Discussion
August1987
10 months agoRegular Visitor
Calculating historic counts based on two date columns
Hi, I'm new to Power BI and struggling with something I feel should be relatively easy but I can't seem to get it to work. The table below contains some dummy data as an example and my relati...
- 10 months ago
Hi August1987
This seems to be a separate issue to the original question i.e. you now mention a y-axis so there's a chart visual involved.
Have you tried my suggestion and checked my example PBIX file?
It's very hard to diagnose an issue when you don't supply the full dataset, or your PBIX file, or even some screenshots. Please supply your PBIX file if you can, it'll make things much easier to help you.
Phil
GeraldGEmerick
Memorable Member
10 months agoAugust1987 The sample data doesn't correspond to your specified results but I believe that something along the lines of following should suffice for your purposes:
Open Items =
VAR _SelectedDate = SELECTEDVALUE( 'Table'[ReceivedDate] )
VAR _Table = FILTER( ALL( 'Table' ), [ReceivedDate] <= _SelectedDate && [ClearedDate] > _SelectedDate )
VAR _Return = COUNTROWS( _Table )
RETURN _Return