Forum Discussion
measure if column value is a certain text
- 6 years ago
Hi my friend, you can apply filter you need, for example if you try this:
MyMeasure = IF ( SELECTEDVALUE('Table'[Name]) = "My Photo1.png", CONCATENATEX ( 'Table', 'Table'[Pic], "", 'Table'[Index], ASC ),"" )When you have 4 values it will fill the concatenation only if selected Name is "My Photo1.png":
So you will get the same behavior if you try with an slicer and a card, the card will fill the concatenation only if the name "My Photo1.png" is selected.
Give it a try and let me know if it works.
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
PS: There is a current contest in this community I'm participating in, if you like it I'll appreciate your Kudo in this link:
Better-Together-T-Shirt-Contest
Regards,
Gian Carlo Poggi
Hi SwaroopShankar,
It is not complicated, just create a measure like this:
MyMeasure =
IF (
HASONEVALUE ( 'Table'[Name] ),
CONCATENATEX (
'Table',
'Table'[Pic],
"",
'Table'[Index], ASC
)
)
And you will see the desired result:
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
PS: There is a current contest in this community I'm participating in, if you like it I'll appreciate your Kudo in this link:
Better-Together-T-Shirt-Contest
Thanks in advance,
Regards,
Gian Carlo Poggi
Hi Gpoggi,
Thanks for trying to help. Your solution works if only 1 image is present in the folder.
I have multiple image files in the same folder. I want a measure that concatenates the strings in 'pic' ONLY if the 'name' matches 'Site Photo 1' (or whatever I mention).
I can control the naming convention of the images, so I can hardwire the 'name' into the measure.
- gpoggi6 years agoResponsive Resident
Hi my friend, you can apply filter you need, for example if you try this:
MyMeasure = IF ( SELECTEDVALUE('Table'[Name]) = "My Photo1.png", CONCATENATEX ( 'Table', 'Table'[Pic], "", 'Table'[Index], ASC ),"" )When you have 4 values it will fill the concatenation only if selected Name is "My Photo1.png":
So you will get the same behavior if you try with an slicer and a card, the card will fill the concatenation only if the name "My Photo1.png" is selected.
Give it a try and let me know if it works.
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
PS: There is a current contest in this community I'm participating in, if you like it I'll appreciate your Kudo in this link:
Better-Together-T-Shirt-Contest
Regards,
Gian Carlo Poggi
- Anonymous6 years agoNot applicableHi SwaroopShankar,
I guess you are doing something like this?
https://blog.crossjoin.co.uk/2019/05/19/storing-large-images-in-power-bi-datasets/
Sorry, I can't test it at the moment, but why not to use Dax GroupBy? I think it will do what you need.
Kind regards,
JB