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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
Chanleakna123
Post Prodigy
Post Prodigy

Turns All Open Cases to Close on Bar Chart

1.PNG

 

hi team , 

 

i use the status as manual on my file and i used Bar chart by counting the ID . 

My purpose is to visualize , if the Case >30 Days it will show all of the Open Case to Close , but if it's <30 Days , it Remains the Same , show "Close " and "Open" Options . 

how to success on this ? 

1 ACCEPTED SOLUTION

Hi @Chanleakna123

 

It seems you need to create a calculated column and drag it to 'Legend' for your chart. Show a simplified sample here.

ChangeState =
IF (
    DATEDIFF ( Table4[Date], TODAY (), DAY ) <= 30,
    Table4[State],
    IF (
        DATEDIFF ( Table4[Date], TODAY (), DAY ) > 30
            && Table4[State] = "Open",
        "Close",
        Table4[State]
    )
)

1.png

 

Regards,

Cherie

Community Support Team _ Cherie Chen
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

4 REPLIES 4
v-cherch-msft
Employee
Employee

Hi @Chanleakna123

 

It seems you need to use DATESBETWEEN Function. If it is not your case, please share more about your simplified data sample and expected output. 

 

Regards,
Cherie

Community Support Team _ Cherie Chen
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Hi , 

below is what my expectation : 

 

My purpose is to visualize , if the Case >30 Days it will show all of the Open Case to Close , but if it's <30 Days , it Remains the Same , show "Close " and "Open" Options . 

how to success on this ? 

 

Therefore if the Case still open from Jan to Aug , it will automatically closed , 

because i dun wanna see case open from Jan to Aug , only in september , Due to it will less than 30 days. if it more than 30 days Close automatically.  

Hi @Chanleakna123

 

It seems you need to create a calculated column and drag it to 'Legend' for your chart. Show a simplified sample here.

ChangeState =
IF (
    DATEDIFF ( Table4[Date], TODAY (), DAY ) <= 30,
    Table4[State],
    IF (
        DATEDIFF ( Table4[Date], TODAY (), DAY ) > 30
            && Table4[State] = "Open",
        "Close",
        Table4[State]
    )
)

1.png

 

Regards,

Cherie

Community Support Team _ Cherie Chen
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

@v-cherch-msft you're awesome.

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.