Forum Discussion
Understanding Time Functions - Currently and historically in a stage
I have a table which can be viewed with the following items
| ID Number | Date Started | Date Lost | Date Completed | Status |
| ABC | 01/01/2021 | null | null | Open |
| ACB | 01/01/2021 | 01/02/2021 | null | Lost |
| ADB | 01/01/2021 | null | 02/02/2021 | Won |
The table offers that shown above, so you can see historically when the ID started the process, if they are still in the process or if they completed or lost the process.
I want to have a matrix which will show me the following:
| Dates | Total Started Process | Total Lost in Process | Total Won | Currently Open |
| Jan | 100 | 3 | 50 | 47 |
| Feb | 150 | 0 | 5 | 192 |
| Mar | 100 | 7 | 10 | 275 |
As you can see I will now be able to see cumulative for how many are currently open based on how many are being added to the process each month.
Please advise?
4 Replies
- smpa01
Community Champion
andrewb95 you will need a Calendar table for this and once you have that you create active and inactive relationship with calendar and fact like this
Once the initial set up is done, you can write following measures to give you what you need and bring the axis from Calendar
Completed = CALCULATE ( COUNT ( 'fact'[Date Completed ] ) ) Lost = CALCULATE ( COUNT ( 'fact'[Date Lost] ), USERELATIONSHIP ( 'Calendar'[Calendar_Date], 'fact'[Date Lost] ) ) Started = CALCULATE ( COUNT ( 'fact'[Date Started] ), USERELATIONSHIP ( 'Calendar'[Calendar_Date], 'fact'[Date Started] ) ) Currently Open = CALCULATE ( CALCULATE ( COUNT ( 'fact'[Date Started] ), FILTER ( 'fact', 'fact'[Date Lost] = BLANK () && 'fact'[Date Completed ] = BLANK () ) ), USERELATIONSHIP ( 'Calendar'[Calendar_Date], 'fact'[Date Started] ) )- andrewb95
Helper II
This is working for the following:
- Completed
- Lost
- Started
However for Currently Opened, I wanna see the month on month opened.
Month Started Lost Completed Open A 10 2 5 3 B 10 0 5 8 C 5 2 7 4 Please advise how to get the latter value as in my data the formula does not work?
- YukiK
Impactful Individual
You can have DAX measures like these and place them in a matrix visual:
Total Started = COUNT(Table[Date Started])
Total Lost = COUNT(Table[Date Lost])
Total Won = CALCULATE( COUNT(Table[Status]), Table[Status] = "Won" )
Total Open = CALCULATE( COUNT(Table[Status]), Table[Status] = "Open" )
Hope that helps!
- v-angzheng-msft
Community Support
Hi, andrewb95
As a general advise, please, provide:
- Sample (dummy dataset) data as text, use the table tool in the editing bar
- Expected output from sample data
- Explanation in words of how to get from 1. to 2.