Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
zgrshn
Regular Visitor

Opened closed dates

Hello

there are 3 columns in my Excel (Count , OpenedDate , ClosedDate)

2016-10-26_13-41-55.png

I want to create a dash on PowerBi Desktop like this ,


2016-10-26_13-36-39.png

 

How can I do it ?

1 ACCEPTED SOLUTION

Hi @zgrshn,

 

According to your description, I made a sample for your reference.

 

I assume you have a table called "MyTestTable" like below.

t1.PNG

1. Add a new table called "StatusTable".

t2.PNG

2. Use the formula below to create a calculate column called "Status" in "MyTestTable" table.

Status = IF(ISBLANK(MyTestTable[ClosedDate]), "Opened","Closed")

c1.PNG

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.

report.PNG

Here is the sample pbix file for your reference.

 

Regards

View solution in original post

5 REPLIES 5
Greg_Deckler
Community Champion
Community Champion

Can you explain where the numbers are coming from in your result?



Follow on LinkedIn
@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
DAX For Humans

DAX is easy, CALCULATE makes DAX hard...

I write the numbers manually in Excel .

2016-10-26_13-41-55.png

 

2016-10-27_09-23-24.png

 

2016-10-27_09-23-48.png

 

 

Hi @zgrshn,

 

According to your description, I made a sample for your reference.

 

I assume you have a table called "MyTestTable" like below.

t1.PNG

1. Add a new table called "StatusTable".

t2.PNG

2. Use the formula below to create a calculate column called "Status" in "MyTestTable" table.

Status = IF(ISBLANK(MyTestTable[ClosedDate]), "Opened","Closed")

c1.PNG

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.

report.PNG

Here is the sample pbix file for your reference.

 

Regards

@v-ljerr-msft

Really like what you've done, easy to understand.

 

Can you help a bit further with that formula (VALUE) if there are 4 status values? I don't have a count column, I just have a status column for each ticket with the following indicator: open, closed, pending and resolved.

(FYI-resolved and closed mean 2 different things)

 

Thank you in advance!

Dear JerryLi

Thank you very much 

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

November Power BI Update Carousel

Power BI Monthly Update - November 2025

Check out the November 2025 Power BI update to learn about new features.

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.