Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.
Hi,
we're pushing some data through REST API to a real-time streaming dataset - there's also a date field among them. Unfortunately, I'm not able to use date hierarchy on visuals (line chart for example).
So we decided to push separate fields with Year/Month/Day as integer data type. PowerBI shows it as float, so it looks strange, to have Year presented like this: 2017,00. After drill down to month level, it's quite OK - there's "correct" Year format and "Month" format (for example 2017 / 05 ).
This problem occurs only if I'm trying to create date hierarchy - in X-axis setting there's no option to change decimal numbers in such case.
Is there any way to change the data type in real-time streaming data? I tried to connect to this data source using Power BI Desktop, but I don't have access to those functions in this data source type.
Any workarounds for that one?
Solved! Go to Solution.
Ok, I think I've found a solution for this issue, but I'm not sure it will work in every case.
I've placed the date in date format into labels of my line chart. So it looks like this (I'm using Power BI in Polish, so I've added transcription to my screenshot).
For the same set in Year/Month/Day there's the same date in a separate date field, for example for Year 2017, Month 1, Day 1 in date I should have 2017-01-01 12:00:00 no matter how many times it appears in my stream of data. So I think it doesn't matter that I'm using earliest of those in chart labels (check screen below).
In this scenario, I've got correct order even when I'm using text values as Year/Month/Day.
Looks like I didn't spend enough time on this case and I rushed a little bit with creating a topic in here. But maybe someone will find this one useful, or there's something wrong in this use case what I'm still missing.
Hi @jakub_derda,
These features could be the restrictions of streaming dataset.
There workaround could be using Text type instead. We won't do arithmetic on Year, Month, Day themselves.
Best Regards,
Dale
Hi Dale,
thanks for Your reply.
I thought about it - using a text field for it, but sometimes I'm getting stuck with sorting it in a correct way - it puts values from 10 to 19 between 1 and 2 just like on a picture below. I'm not sure if I can change it somehow. I'm just trying to create a simple line chart with date hierarchy and it seems to be impossible. 😛
Ok, I think I've found a solution for this issue, but I'm not sure it will work in every case.
I've placed the date in date format into labels of my line chart. So it looks like this (I'm using Power BI in Polish, so I've added transcription to my screenshot).
For the same set in Year/Month/Day there's the same date in a separate date field, for example for Year 2017, Month 1, Day 1 in date I should have 2017-01-01 12:00:00 no matter how many times it appears in my stream of data. So I think it doesn't matter that I'm using earliest of those in chart labels (check screen below).
In this scenario, I've got correct order even when I'm using text values as Year/Month/Day.
Looks like I didn't spend enough time on this case and I rushed a little bit with creating a topic in here. But maybe someone will find this one useful, or there's something wrong in this use case what I'm still missing.
Thanks for sharing.
Best Regards,
Dale
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.