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
KK_B
Regular Visitor

Need help with Status Bar in Power BI

Hello Experts,

 

I need some of your help with my below requirement:

I have a table in power bi with these data:

CallDateTime        Status

3/19/23 8:55 AM     1

3/19/23 8:50 AM     1

3/19/23 8:45 AM     0

3/19/23 8:40 AM     1

3/19/23 8:35 AM     0

3/19/23 8:30 AM     0

3/19/23 8:25 AM     1

etc

I want to show the status bar with this conditions:

If sum(status) for last three calldatetime values = 3 then green

   sum(status) for last three calldatetimevalues = 2 then yellow

   sum(status) for last three calldatetimevalues = 1 then orange

  sum(status) for last three calldatetimevalues = 0 then red.

If I select the date ranges in the report filter then status bar has to do the calculations for that date range.

Can some one please help me with this request?

 

Thanks,

KKB

 

1 ACCEPTED SOLUTION
amitchandak
Super User
Super User

@KK_B , Create a measure like

 M1= sum(Table[status])

 

Then create a color measure

 

Color = Switch( True() ,

[M1] >= 3, "Green",

[M1] = 2, "Yellow",

[M1] = 2, "Orange",

"Red")

 

Use color measure in conditional formatting using the field value option

How to do conditional formatting by measure and apply it on pie?
https://www.youtube.com/watch?v=RqBb5eBf_I4&list=PLPaNVDMhUXGYo50Ajmr4SgSV9HIQLxc8L
https://community.powerbi.com/t5/Community-Blog/Power-BI-Conditional-formatting-the-Pie-Visual/ba-p/...
https://amitchandak.medium.com/power-bi-where-is-the-conditional-formatting-option-in-new-format-pan...

View solution in original post

1 REPLY 1
amitchandak
Super User
Super User

@KK_B , Create a measure like

 M1= sum(Table[status])

 

Then create a color measure

 

Color = Switch( True() ,

[M1] >= 3, "Green",

[M1] = 2, "Yellow",

[M1] = 2, "Orange",

"Red")

 

Use color measure in conditional formatting using the field value option

How to do conditional formatting by measure and apply it on pie?
https://www.youtube.com/watch?v=RqBb5eBf_I4&list=PLPaNVDMhUXGYo50Ajmr4SgSV9HIQLxc8L
https://community.powerbi.com/t5/Community-Blog/Power-BI-Conditional-formatting-the-Pie-Visual/ba-p/...
https://amitchandak.medium.com/power-bi-where-is-the-conditional-formatting-option-in-new-format-pan...

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.

Top Solution Authors