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

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
rnian18
Helper II
Helper II

Get Image URL from Table based on calculated measure.

Hey guys, I have a 3x2 Table.  The table has 3 image URLs with their corresponding index values.  I also have a calculated measure.  

 

If the calculated measure = 0, I want the first Image URL.  If the calculated measure is > 0 but less than 1, I want the second Image URL.  Otherwise, I want the last Image URL.

 

I am wondering how I can use the calculated measure to filter for my image URL column.

 

Thanks!!

1 ACCEPTED SOLUTION
v-kelly-msft
Community Support
Community Support

Hi @rnian18 ,

 

I dont know what your actual data is,here,I made a simple sample as below:

For the original table is as following:

v-kelly-msft_0-1621235443282.png

Here,I made the URL column show as Image URL,and you will see the result in a table visual like:

v-kelly-msft_1-1621235519712.png

Then I create a slicer table which will result a measure to return different values:

Slicer table = VALUES('Table'[No])
Measure = SELECTEDVALUE('Slicer table'[No])

Finally create a measure similarily as below:

Measure 2 = SWITCH('Table'[Measure],
1,CALCULATE(MAX('Table'[URL]),FILTER('Table','Table'[No]=1)),
2,CALCULATE(MAX('Table'[URL]),FILTER('Table','Table'[No]=2)),
3,CALCULATE(MAX('Table'[URL]),FILTER('Table','Table'[No]=3)))

Put the measure in the filter pane of the table visual which show the Image and select "is not blank" then apply,you will see:

v-kelly-msft_2-1621235748864.pngv-kelly-msft_3-1621235760058.png

To sum up,you need to create a measure to filter a table which contains the Images you wanna show.And of course,you need first to have the table with all Images you wanna show.

 

For my sample .pbix file,pls see attached.

 

Best Regards,
Kelly

Did I answer your question? Mark my post as a solution!

 

View solution in original post

1 REPLY 1
v-kelly-msft
Community Support
Community Support

Hi @rnian18 ,

 

I dont know what your actual data is,here,I made a simple sample as below:

For the original table is as following:

v-kelly-msft_0-1621235443282.png

Here,I made the URL column show as Image URL,and you will see the result in a table visual like:

v-kelly-msft_1-1621235519712.png

Then I create a slicer table which will result a measure to return different values:

Slicer table = VALUES('Table'[No])
Measure = SELECTEDVALUE('Slicer table'[No])

Finally create a measure similarily as below:

Measure 2 = SWITCH('Table'[Measure],
1,CALCULATE(MAX('Table'[URL]),FILTER('Table','Table'[No]=1)),
2,CALCULATE(MAX('Table'[URL]),FILTER('Table','Table'[No]=2)),
3,CALCULATE(MAX('Table'[URL]),FILTER('Table','Table'[No]=3)))

Put the measure in the filter pane of the table visual which show the Image and select "is not blank" then apply,you will see:

v-kelly-msft_2-1621235748864.pngv-kelly-msft_3-1621235760058.png

To sum up,you need to create a measure to filter a table which contains the Images you wanna show.And of course,you need first to have the table with all Images you wanna show.

 

For my sample .pbix file,pls see attached.

 

Best Regards,
Kelly

Did I answer your question? Mark my post as a solution!

 

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

November Power BI Update Carousel

Power BI Monthly Update - November 2025

Check out the November 2025 Power BI update to learn about new features.

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.