dm-p / powerbi-visuals-html-content

Visualise column or measure values as HTML in your Power BI reports. Intended as a spiritual successor to the OG HTML Viewer custom visual, with some extra stuff thrown in.
MIT License
85 stars 18 forks source link

[ENHANCEMENT] Message : No data available to display #26

Closed noliverte closed 3 years ago

noliverte commented 3 years ago

Hi,

I use your extension in Powerbi and it works great.

In my use case, I'm showing data in the html5 component, and it works fine. But when there is no data to display, I get a message that appears in the component "No data available to display." Is there a way to replace it with another message?

Thanks for your help

Noliverte

dm-p commented 3 years ago

Hi, and thanks for the feedback. The message is configured in the visual's localised text, but from an end-user standpoint, this is effectively "hard-coded" and not possible to change, unless you hack the .pbiviz.

I'll make a release available shortly with a feature that will work as follows - hopefully this will provide the most flexibility possible:


If there is no data to display, then the message will be displayed as normal by default, e.g.:

        image


However, this message will be surfaced to the Content Formatting property menu as "No Data" Message, e.g.:

        image


You can customise this like a regular property and this can replace the message, e.g.:

        image


Or, you can write a measure containing HTML and use conditional formatting to display that instead, e.g.:

Measure DAX: <HTML> No Data Message = "<img src='https://icon-library.net/images/no-data-icon/no-data-icon-10.jpg' width='250'/>"

        image

dm-p commented 3 years ago

This has been included in 1.1.0 of the visual, and has been submitted to AppSource. MS don't provide an ETA on when updates become available and the process can take anywhere from 2 weeks to 2 months. If you want to use the feature before then, you can obtain the standalone version of the visual from its release page.

Please note that this standalone version does not auto-update as it is no longer tied to the marketplace version, so if you are unsure what this means, then it's probably best to wait for it to become available.