@Pezhman Sharafdin Welcome to Microsoft Q&A forum!
I don't know how I can create and publish a real-time report of Power BI on the web. (I could make a real-time dashboard on Power BI. But, I can just share it with team members). I tried to connect the azure stream database to Power BI to create a report. But the report doesn't show the data stream in real-time (it is not auto-refresh).
Please note that, You can add Power BI as an output within Azure Stream Analytics (ASA), and then visualize those data streams in the Power BI service in real time.
Azure Stream Analytics uses the Power BI REST APIs to create its output data stream to Power BI, with defaultMode set to pushStreaming, resulting in a dataset that can take advantage of both push and streaming. When the dataset is created, Azure Stream Analytics sets the retentionPolicy flag to basicFIFO. With that setting, the database supporting its push dataset stores 200,000 rows, and which rows are dropped in a first-in first-out (FIFO) fashion.
If your Azure Stream Analytics query results in very rapid output to Power BI (for example, once or twice per second), Azure Stream Analytics will begin batching those outputs into a single request. This may cause the request size to exceed the streaming tile limit. In that case, as mentioned in previous sections, streaming tiles will fail to render. In such cases, the best practice is to slow the rate of data output to Power BI; for example, instead of a maximum value every second, set it to a maximum over 10 seconds.
Take a look at this doc Visualize real-time sensor data from your Azure IoT hub in a web application and let us know if it helps. Below is the architecture involved in Visualize real-time sensor data from your Azure IoT hub in a web application.
I'm also curious about alternative solutions. Can I, for example, define a query on time series insights to calculate KPIs in real-time and send calculated value to Power BI?
Azure Time Series Insights Gen2 enables data querying on events and metadata stored in the environment via public surface APIs. These APIs also are used by the Azure Time Series Insights TSI Explorer. See Querying Data from Azure Time Series Insights Gen2 for more details.
!Note: The Time Series Insights (TSI) service will no longer be supported after March 2025. Consider migrating existing TSI environments to alternative solutions as soon as possible. For more information on the deprecation and migration, visit our documentation.
Do let us know if you have any further queries. We would be happy to help you.
If the response is helpful, please click "Accept Answer" and upvote it.