As a web-based BI tool, SeekTable allows you to use custom HTML within table cells, providing flexibility beyond standard cell properties like background/text color and font styles. This HTML formatting works for report's web view, PDF and HTML exports (including reports inlined in emails) + cell properties affect Excel export too.
There are 2 ways how conditional / HTML formatting can be configured:
=(expression)Note that expressions should always be wrapped in brackets. The expression syntax is the same as for calculated cube members; however, local variables are not supported. The only variable that can be used is
value which refers to the cell's value.
=(value==0 ? "-" : "{0:0.00}").
In this case, the conditional format specifier will carry over to Excel exports.
PivotTable.*.
In both cases you can use special HTML-related functions to apply custom HTML and/or conditional formatting rules:
Html.Link to render a link (<a> tag). This function affects cells in Excel exports too!Html.SetTextColor to set the color of the text (applied to cell's tag TH/TD). This function affects cells in Excel exports!Html.SetBackgroundColor to set background color of the text (applied to cell's tag TH/TD). This function affects cells in Excel exports!Html.SetBold and Html.SetItalic to set a font style of the text. This function affects cells in Excel exports!Html.Raw allows you to render any custom HTML code inside the table cell. With 2nd argument it is possible to specify a non-HTML value for non-HTML exports (CSV, Excel, JSON).
You can customize cells style (color/background color, bold/italics, font size etc) based on cell values. The following expression highlights with red measure values that below some threshold:
=(value<200 ? Html.SetTextColor("{0:#.##}", "#FF0000") : value))
SumOfTotalExpressionHtml.SetTextColor( Html.Raw( Format("{0:#.##}", [SumOfTotal] ), SumOfTotal), SumOfTotal<200 ? "red" : null)
In a similar way, if you don't want ' want to have colors in the Excel export too:
SumOfTotal<200 ? Html.Raw( "<span style='color:red;'>"+Html.HtmlEncode(SumOfTotal)+"</span>", SumOfTotal) : SumOfTotalThen add one more parameter to declare the name of measure that is used in the expression:
SumOfTotal
SumOfTotalFormattedSumOfTotalFormatted measure for Values.
See here how it looks in the demo report.
You can use HTML formatting for links rendering:
company_name and company_website_url dimensionsExpressioncompany_name_linkedHtml.Link(company_website_url, company_name, true)Then add the following values to declare dimension names used in the expression:
company_name
company_website_url
company_name_linked dimension
In a similar way you can render <img> tag and display images in the table cells or create a link another report.