Forum Discussion
RenataOG30s
4 years agoFrequent Visitor
Replace a value for an image in DAX measure
Hello all,
I have the DAX below, which gives that red dot (it's just a letter 'o') when the growth is negative.
Has Poor Course = VAR ThisAcademicYear =
(
SELECTCOLUMNS (
TOPN (
1,
'DWH Dim_Application_Date',
'DWH Dim_Application_Date'[Application Academic Year Desc], DESC
),
"Application Academic Year Desc", 'DWH Dim_Application_Date'[Application Academic Year Desc]
)
)
VAR LastAcademicYear =
(
LEFT ( ThisAcademicYear, 4 ) - 1 & "/"
& LEFT ( ThisAcademicYear, 4 )
)
VAR ApplicationsByCourse =
(
SUMMARIZE (
'DWH Fact_Course_Application',
'DWH Dim_Course'[Course Name],
"Applications This Year", CALCULATE (
SUM ( 'DWH Fact_Course_Application'[Application Count] ),
'DWH Dim_Application_Date'[Application Academic Year Desc] = ThisAcademicYear
),
"Applications Last Year", CALCULATE (
SUM ( 'DWH Fact_Course_Application'[Application Count] ),
'DWH Dim_Application_Date'[Application Academic Year Desc] = LastAcademicYear
)
)
)
RETURN
SELECTCOLUMNS (
TOPN (
1,
ApplicationsByCourse,
IF (
DIVIDE ( [Applications YTD Current Year], [Applications Last Year YTD] ) - 1 < 0,
1,
0
), DESC
),
"isPoorPerformer", IF (
DIVIDE ( [Applications YTD Current Year], [Applications Last Year YTD] ) - 1 < 0,
"o",
""
))
My question is, how can replace the letter with an image?
I have tried copy and paste the URL link on the measure, but it gives me a link address on the table rather than an image.
Can you please advise?
Many thanks,
R.
1 Reply
- ERD
Community Champion
Hi RenataOG30s ,
Have a look at this article: https://visualbi.com/blogs/microsoft/powerbi/dynamically-display-images-power-bi/
If this post helps, then please consider Accept it as the solution ✔️to help the other members find it more quickly.