Forum Discussion
gUPTA
9 years agoNew Member
Workaround a for Measure to return a URL
I am trying to construct a table in my dashboard with some numerical data for various categories, with an image indicating whether the category is above or below a certain benchmark. I am using the ...
- 9 years ago
You may use DAX below to add a calculated column.
Benchmark = VAR AvgOfDays = AVERAGEX ( FILTER ( Table1, Table1[Category] = EARLIER ( Table1[Category] ) ), Table1[Num of Days] ) RETURN SWITCH ( TRUE (), AvgOfDays <= 90, "https://www.google.com/favicon.ico", "https://www.microsoft.com/favicon.ico" )
v-chuncz-msft
9 years agoCommunity Support
You may use DAX below to add a calculated column.
Benchmark =
VAR AvgOfDays =
AVERAGEX (
FILTER ( Table1, Table1[Category] = EARLIER ( Table1[Category] ) ),
Table1[Num of Days]
)
RETURN
SWITCH (
TRUE (),
AvgOfDays <= 90, "https://www.google.com/favicon.ico",
"https://www.microsoft.com/favicon.ico"
)
pcraokjr
8 years agoFrequent Visitor
Hi
but unfortunately calculated column is not displaying the right KPI Indicators icon, Always its showing me same icon(let’s say Red or Green) irrespective of my return value(Index) in below query.
Same query if I created as calculated Measure it works fine but calculate measure not displaying the icon and displaying url as plain text due to limitation on type.
Is anyone faced similar issue to display KPI Indicators icons…if so Please provide solution
KPI Icon =
VAR Index = IF( [Variance] >0 , 1 ,0)
RETURN
SWITCH (
TRUE (),
Index = 0, "https://kjrsw/Red.png",
"https://kjrsw/Green.png"
)