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

Data Days is here! Join us now for 60+ days of learning, challenges, and connection. Learn more

Reply
Frixel
Post Prodigy
Post Prodigy

How make a colored button?

Hello all,

 

I have a problem to make a button/shape or something that can change when the data give a Orange/Green (Started/Finished) instuction in the .csv data file when it is updated like here under.

 

So i think there is a green button/shape for row 1 and 2 because station004 gives back it is Finished (Green is the latest update)

And a button for row 3 station002 is the button/shape Orange because the file gives back that it is started (Orange is the latest update)

 

How can i make something that the color is change if the data is changed?

 

1.png 

1 ACCEPTED SOLUTION

Hi @Frixel !

 

You need to remove Last ')' paranthesis in your DAX formula.

 

Regards,

Hasham

View solution in original post

11 REPLIES 11
HashamNiaz
Solution Sage
Solution Sage

Hi @Frixel !

 

You can set the Button background property or Fill color property set the property to be based on conditional formatting & set the Fomrat by to Field Value and provid ethe color column.

 

Regards,

Hasham

selimovd
Most Valuable Professional
Most Valuable Professional

Hey @Frixel ,

 

you can use the conditional formatting to change the background of that rolumn based on the value. This would then also dynamically adapt. Check out the following article on how to that:

https://docs.microsoft.com/en-us/power-bi/create-reports/desktop-conditional-table-formatting#color-...

 

If you need any help please let me know.

If I answered your question I would be happy if you could mark my post as a solution ✔️ and give it a thumbs up 👍

 

Best regards

Denis

 

Blog: WhatTheFact.bi

Follow me: twitter.com/DenSelimovic

Hi @selimovd 

Yes i have found that article and have make this.
But how make i that when Finished the Started not more visible is?

 

2.png

Hi @Frixel !

 

There are multiple ways to solve this, You can create a measure to get teh latest status and you can only populate latets status based on that measure.

 

You create another flag measure which can be used to hide/unhide card visuals based on status.

 

Regards,

Hasham

Hi @HashamNiaz 

 

Oke, i think i understand it but i can`t choise 'the latest" by the filter.

Can i then also the new messure connect to a shape for color changing?

3.png

Hi @Frixel !

 

You can creat a Latest Status measur eusing following DAX;

 

LatestStatus = 
  VAR _LastDate = CALCULATE(MAX(AccountStatus[DateTime]), ALLEXCEPT(AccountStatus, AccountStatus[Account]))
RETURN
    CALCULATE(MAX(AccountStatus[Status]),  FILTER(AccountStatus, AccountStatus[DateTime] = _LastDate))

 

You can replace AccountStatus as your Table name & respectively choose the column name.

 

Regards,

Hasham

Hi @HashamNiaz 

 

When i changed it then i have this error.

I filter in the report on Today so what i wil see is then the latest "Time"

 

4.png

Hi @Frixel !

 

You need to remove Last ')' paranthesis in your DAX formula.

 

Regards,

Hasham

Thanks @HashamNiaz  the last ')' was the issue.

 

Now i have this result but that is based on the 'Table' is it possible to 'connect' it with or as a visual like a button or shape?

When i choise a shape then i don`t have the options of the fields for the shape.

How do i do that?  

 

6.png

Hi @Frixel !

 

You can place this measure on Card Visual and overlay a button image over it using selection pane.

 

Regards,

Hasham

Hi @HashamNiaz 

 

Sorry but I don`t know what you mean with:  overlay a button image over it using selection pane. 

Can you explain that for me?

Helpful resources

Announcements
Fabric Data Days is here Carousel

Fabric Data Days 2026

Don't miss out on Data Days, June 15 through August 7. Learn Fabric, Power BI, SQL, AI and more.

May Power BI Update Carousel

Power BI Monthly Update - May 2026

Check out the May 2026 Power BI update to learn about new features.

Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.