Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
5 years ago
Solved

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.  I...
  • v-kelly-msft's avatar
    5 years ago

    Hi Anonymous ,

     

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

    For the original table is as following:

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

    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:

    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!