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
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
Super User
Super User

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
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.