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
AnkitaChatterje
Frequent Visitor

How to change an image as per a column value of a table in power BI Desktop?

Hi,

 

I have some saved images of a visualisation in 3 different color modes viz. "Green", "Yellow", "Red" & "Black". Also, I have a table where there is a "Color" column which states the current color of the visualisation viz. "green", "yellow", "red" or "black". 

 

I want to set a condition in power query that will display the visualisation accordingly-

 

a) If the column value is "green", then display the visualisation with color mode "Green" OR

b) If the column value is "yellow", then display the visualisation with color mode "Yellow" OR

c) If the column value is "red", then display the visualisation with color mode "Red" OR

d) If the column value is "black", then display the visualisation with color mode "black"

 

Sample pic of the visual with color mode "Green"Sample pic of the visual with color mode "Green"

 

Pic of data table with "Gauge_Color" columnPic of data table with "Gauge_Color" column

 

Kindly tell me how I can schedule the visualisations as per the above conditions.

 

1 ACCEPTED SOLUTION
v-piga-msft
Resident Rockstar
Resident Rockstar

Hi @AnkitaChatterje,

 

Based on your description, do you want to create a custom conditional column in Query Editor?

 

If it is, you only need to select Conditional column and add rule. You could type you image url to the output value.

 

add column.png

 

In addition, if you want to show image in Power BI, you need to change the Data Category of URl column to be image URL under Modeling.

 

If you need further help, please share your desired output and your data sample, so that we can help further investigate on it?

 

Best Regards,

Cherry

Community Support Team _ Cherry Gao
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

2 REPLIES 2
v-piga-msft
Resident Rockstar
Resident Rockstar

Hi @AnkitaChatterje,

 

Based on your description, do you want to create a custom conditional column in Query Editor?

 

If it is, you only need to select Conditional column and add rule. You could type you image url to the output value.

 

add column.png

 

In addition, if you want to show image in Power BI, you need to change the Data Category of URl column to be image URL under Modeling.

 

If you need further help, please share your desired output and your data sample, so that we can help further investigate on it?

 

Best Regards,

Cherry

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

Thanks for the help. I have solved my problem using this approach. But is it possible to do the same thing with local images stored in device?

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.