Forum Discussion

gUPTA's avatar
gUPTA
New Member
9 years ago
Solved

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 ...
  • v-chuncz-msft's avatar
    9 years ago

    gUPTA,

     

    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"
        )