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

Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now

Reply
Iaguas
Frequent Visitor

Get each value from a column according to the selection of a segmentation and store it in a variable

Hello everyone,

 

I'm using the HTML VizCreator Flex visual to create an image presentation. I managed to do this with fixed images, that is, without the option for the user to select the dates corresponding to these images through a segmentation.
I wanted to know if there was a way with DAX to get each value from my URL column corresponding to the DATE column according to the user's selection in the DATE segmentation and save it in a variable. With this variable, I use an HTML image tag as the image source.
If I were using JS, I would create an array and use a for loop to get these images and add them to my HTML tags, but from what I've seen, I can't use JS, I would have to use DAX.
With all the ways I've tried so far, I can only concatenate the URLs I need, and that's not what I want.

I am new to Power BI and any help would be greatly appreciated.

 

Thank you very much.

 

1 ACCEPTED SOLUTION

Thanks for the help, but I need it to be a slideshow or a carousel of images. So I would need to select all the images in a period of time and save them in a variable to concatenate with the image HTML tags.
But I just figured out how, I just need to use the concatenate function, and instead of concatenating the URLS with ", " I concatenated them with the HTML tags and it worked. But thanks anyway.

View solution in original post

2 REPLIES 2
Anonymous
Not applicable

Hi @Iaguas ,

 

Based on your description I created simple test data.

vlinhuizhmsft_0-1734402148225.png

 

At this point you can use the date to create a slicer and create a measure:

Measure = SELECTEDVALUE('table'[picture])

 

Result:

vlinhuizhmsft_1-1734402251308.png

vlinhuizhmsft_2-1734402269531.png

 

Best Regards,
Zhu

 

If there is any post helps, then please consider Accept it as the solution  to help the other members find it more quickly.

Thanks for the help, but I need it to be a slideshow or a carousel of images. So I would need to select all the images in a period of time and save them in a variable to concatenate with the image HTML tags.
But I just figured out how, I just need to use the concatenate function, and instead of concatenating the URLS with ", " I concatenated them with the HTML tags and it worked. But thanks anyway.

Helpful resources

Announcements
November Power BI Update Carousel

Power BI Monthly Update - November 2025

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

Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

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.

Top Solution Authors
Top Kudoed Authors