Forum Discussion
Opened closed dates
- 9 years ago
Hi zgrshn,
According to your description, I made a sample for your reference.
I assume you have a table called "MyTestTable" like below.
1. Add a new table called "StatusTable".
2. Use the formula below to create a calculate column called "Status" in "MyTestTable" table.
Status = IF(ISBLANK(MyTestTable[ClosedDate]), "Opened","Closed")
3. Use the formula below to create a measure called "Value".
Value = IF ( ISBLANK ( CALCULATE ( COUNTROWS ( MyTestTable ), FILTER ( MyTestTable, MyTestTable[Status] = FIRSTNONBLANK ( StatusTable[Status], 1 ) ) ) ), IF ( FIRSTNONBLANK ( StatusTable[Status], 1 ) = "Opened", SUM ( MyTestTable[Count] ), 0 ), SUM ( MyTestTable[Count] ) )4. Use Matrix and Stacked column chart to show the data on the report.
Here is the sample pbix file for your reference.
Regards
Can you explain where the numbers are coming from in your result?
- zgrshn9 years agoRegular Visitor
I write the numbers manually in Excel .
- v-ljerr-msft9 years agoMicrosoft Employee
Hi zgrshn,
According to your description, I made a sample for your reference.
I assume you have a table called "MyTestTable" like below.
1. Add a new table called "StatusTable".
2. Use the formula below to create a calculate column called "Status" in "MyTestTable" table.
Status = IF(ISBLANK(MyTestTable[ClosedDate]), "Opened","Closed")
3. Use the formula below to create a measure called "Value".
Value = IF ( ISBLANK ( CALCULATE ( COUNTROWS ( MyTestTable ), FILTER ( MyTestTable, MyTestTable[Status] = FIRSTNONBLANK ( StatusTable[Status], 1 ) ) ) ), IF ( FIRSTNONBLANK ( StatusTable[Status], 1 ) = "Opened", SUM ( MyTestTable[Count] ), 0 ), SUM ( MyTestTable[Count] ) )4. Use Matrix and Stacked column chart to show the data on the report.
Here is the sample pbix file for your reference.
Regards
- zgrshn9 years agoRegular Visitor
Dear JerryLi
Thank you very much