cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
ChrisWeeks92 Helper I
Helper I

live dataset issues for floorplan

Hi

 

I am trying to create a synoptic panel floor plan looking like this floorplan with colours.JPG

My aim is to show the live status of the doors & windows.  It isnt quite working though.  It isnt pulling the latest row through to the panel.  

My data looks something like this;

door status data.JPG

 

The closed column is a measure with the following DAX

closed = IF(CONTAINS(RealTimeData,RealTimeData[state],"NOT_PRESENT"),0,1)

and Last Closed State is another measure which isnt working correctly though.  This has the following DAX

LastClosedState = 
IF ( 
    HASONEVALUE ( RealTimeData[area2]),
    VAR LastTime = MAXA(RealTimeData[createTime])
    VAR Result = CALCULATE (RealTimeData[closed] , RealTimeData[createTime] = LastTime )
    RETURN Result
)

My dataset is being inserted from MS-Flow via an API.  when a door or window opens or closes it inserts another row with the current status and this is what i want the synoptic panel visual to view and not the previous rows in the dataset.  

 

I have a deadline for this friday to get it working and for the panel to be updating when someone opens/closes the window or door.  I hope someone is able to guide me in the right direction and get the floorplan working correctly. 

3 REPLIES 3
Highlighted
Community Support
Community Support

Re: live dataset issues for floorplan

Hi ChrisWeeks92,

 

For further analysis, could you share your connection string or rest api connection details in your power query code? 

 

Regards,

Jimmy Tao

ChrisWeeks92 Helper I
Helper I

Re: live dataset issues for floorplan

Hi @v-yuta-msft  

 

My JSON connection is this

 

{
    "type": "object",
    "properties": {
        "event": {
            "type": "object",
            "properties": {
                "eventId": {
                    "type": "string"
                },
                "targetName": {
                    "type": "string"
                },
                "eventType": {
                    "type": "string"
                },
                "data": {
                    "type": "object",
                    "properties": {
                        "temperature": {
                            "type": "object",
                            "properties": {
                                "value": {
                                    "type": "integer"
                                },
                                "updateTime": {
                                    "type": "string"
                                }
                            }
                        },
                        "touch": {
                            "type": "object",
                            "properties": {
                                "updateTime": {
                                    "type": "string"
                                }
                            }
                        },
                        "objectPresent": {
                            "type": "object",
                            "properties": {
                                "state": {
                                    "type": "string"
                                },
                                "updateTime": {
                                    "type": "string"
                                }
                            }
                        }
                    }
                },
                "timestamp": {
                    "type": "string"
                }
            }
        },
        "labels": {
            "type": "object",
            "properties": {
                "name": {
                    "type": "string"
                },
                "area": {
                    "type": "string"
                },
                "area2": {
                    "type": "string"
                }
            }
        }
    }
}

and the data is being pushed to the flow url which is then being added into the live Power BI dataset

 

Does this help?

ChrisWeeks92 Helper I
Helper I

Re: live dataset issues for floorplan

Sorry to post again, but can anyone help me as i need to get this over to my boss by monday.  

 

Ultimately i am after the latest row only from each area2 and the status of whether they are open or not.  

 

I am using api/live data so i can only create measures.  

 

Any help is much appreciated

Helpful resources

Announcements
New Ranks Launched March 24th!

New Ranks Launched March 24th!

The time has come: We are finally able to share more details on the brand-new ranks coming to the Power BI Community!

‘Better Together’ Contest Finalists Announced!

‘Better Together’ Contest Finalists Announced!

Congrats to the finalists of our ‘Better Together’-themed T-shirt design contest! Click for the top entries.

Arun 'Triple A' Event Video, Q&A, and Slides

Arun 'Triple A' Event Video, Q&A, and Slides

Missed the Arun 'Triple A' event or want to revisit it? We've got you covered! Check out the video, Q&A, and slides now.

Join THE global Microsoft Power Platform event series.

Join THE global Power Platform event series.

Attend for two days of expert-led learning and innovation on topics like AI and Analytics, powered by Dynamic Communities.

Community Summit North America

Community Summit North America

Innovate, Collaborate, Grow. The top training and networking event across the globe for Microsoft Business Applications

Top Solution Authors
Top Kudoed Authors