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
Community Support
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"
)
gUPTA
9 years agoNew Member
This worked great, thank you so much!
Is there any way to get the measure to respond dynamically to other filters? For example if I have page-level filters in the report?
Right now it seems the AvgOfDays variable is static, so it doesn't respond to other filters in the page, so the icons don't change in response to other filters on the page.
- v-chuncz-msft9 years ago
Community Support
Add a measure below, and use conditional formatting instead.
Measure = SIGN ( AVERAGE ( Table1[Num of Days] ) - 90 )
- A008155038 years agoRegular Visitor
Hi, I'm having a similar problem with my report, did you ever find a solution for makin a dynamic measure?
Thank you.
Maria