Hello @Aurovind Sagar Epari ,
welcome to this moderated community forum.
There are several options for distributing your state.
You can send the state with every telemetry message. This is by far the easiest solution but it also means more data communication because the state will not change that much so you keep sending the same state over and over again.
Another solution is writing the state in the reported properties of the device twin. This means you probably only update it when the state changes. There is this possibility to create non-telemetry device twin change message streams. So these messages can be picked up as a stream also. The state is available for other services too to read it (pull) from the device twin.
The third solution is message enrichment. You update the reported properties in the device twin. Each incoming telemetry message (without state) is enriched by the IoT Hub. There could be a small delay between writing the reported properties and the enrichment enriching the new state.
Now you have one or two streams that can be picked up by Stream Analytics. From there you can attach PowerBI directly because it comes with internal PowerBI storage (for a limited time) or you put some database in between (output messages to tables in Sql Azure or Azure Data Explorer) and attach PowerBI to one of these databases.
Stream Analytics just works on incoming messages. If there are no messages (the device is disconnected), there will be no output.
An easy way to listen to the device connection/disconnection messages on the IoT Hub and route them as an extra stream to stream analytics/power bi.
Or write a time-triggered Azure Function which checks the connectivity of your devices.
Check out the different IoT HUb routing options here.
If the response helped, do "Accept Answer". If it doesn't work, please let us know the progress. All community members with similar issues will benefit by doing so. Your contribution is highly appreciated.