0

I am streaming real time tweets using R script and sending it to Power BI using (Streaming data and REST API) to create a live streaming dashboard.

I have to create a tile which shows tweets over time. But the date/time field does not get reflected in the tile, it is just empty.

I'm not sure if I have to change the datatype or format of the field? Below is how the date/time field looks in R.

enter image description here

The streaming dataset is as below: enter image description here

Below is the tile I created (Shows blank)

enter image description here

Hackerds
  • 1,195
  • 2
  • 16
  • 34

1 Answers1

0

If you don't see anything in the tile, probably your dataset doesn't received anything. Try to post some data manually, e.g. from a PowerShell script (place the correct URL):

$endpoint = "https://api.powerbi.com.com/beta/........."
$Time_Stamp = ($Time_Stamp = Get-Date).Datetime
$payload = @{ "date" = $Time_Stamp; "count" = 98.6; "score" = 98.6 }
Invoke-RestMethod -Method Post -Uri "$endpoint" -Body (ConvertTo-Json @($payload))

Does anything shows up in the tile? As we see from your screenshot, you enabled Historic data analysis. This means that you can create reports with this dataset. Try to make one to show the contents in a table. Is there any rows in this dataset?

UPDATE: Actually, to be sure, copy the sample PowerShell code to post to your dataset and try it. Go to the list of datasets in your workspace, find your one in the list and click on the (i) icon. Then from API Info panel go to PowerShell and copy/paste the code in PowerShell ISE to execute it:

enter image description here

Also, keep in mind that the tile will auto update itself only in a dashboard. You may need to refresh the report to get the up to date data, if you are looking at the tile in a report.

Andrey Nikolov
  • 12,967
  • 3
  • 20
  • 32
  • Correct. I tried to create a report, but I dont see any data reflecting in the chart. Maybe I have to convert the date time to string. – Hackerds Nov 05 '18 at 12:04
  • Obviously the reason to see nothing is that the dataset didn't received any data. Don't try to use strings for dates. Use the correct data type - in this case DateTime. The problem should be in the code that posts data to your dataset. Use alternative ways to post data to it to confirm that. – Andrey Nikolov Nov 05 '18 at 12:09
  • Didnt try the powershell part yet, but the the data is of 'data time' type and not a string. Should I just convert it to the format in streaming data set? "2018-11-05T12:59:06.856Z" – Hackerds Nov 05 '18 at 12:59
  • The above comment is the 'streaming dataset' format. The following is the data returned from the R script "2018-11-05 12:09:12" which is of Date/Time type. I tried sending this value, still fails. – Hackerds Nov 05 '18 at 13:11
  • 1
    It will fail, because "2018-11-05 12:09:12" is not in the expected format. You must send it in the expected one. This question may help you https://stackoverflow.com/questions/10286204/the-right-json-date-format – Andrey Nikolov Nov 05 '18 at 13:22