cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
Anonymous
Not applicable

Changing value types in power bi

Hello Everyone, 

I have an interest rate table which contains years and according values.  In my year column there are only years like (2017, 2018). The data type of this year table is decimal number and while adding this table to the axis of the line chart it gives me mixed year hierrarchy. So, I know I shoul change the data type of year column to the date type but whenever I try this I get years like 1905/1906.

Can anyone knows how can I deal with it?

 

1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted
Microsoft
Microsoft

Re: Changing value types in power bi

Hi , @Anonymous 

Try steps as below:

1.chose field "year " and right click to choose "new hierachy"

 

01.png

 

2.right click field "Quarter" to choose "add to hierachy" ->"Year Hierarchy"

02.png

it will show  as below:

03.png

 

3. Then click "..." in visual to  choose " sort ascending " ,"sort by Year Quarter"  

04.png

 

4.The result will show as below

05.png

If I misunderstand something ,please let me know.

Best Regards,
Community Support Team _ Eason
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

 

 

View solution in original post

6 REPLIES 6
Highlighted
Super User IV
Super User IV

Re: Changing value types in power bi

Change to text.

Refer the steps in :https://community.powerbi.com/t5/Community-Blog/Decoding-Direct-Query-in-Power-BI-Part-1-Time-Intell... . There is a step to change year data type

Appreciate your Kudos.



Did I answer your question? Mark my post as a solution! Appreciate your Kudos!!
My Recent Blog -Week is not so Weak Connect on Linkedin

Proud to be a Super User!

Highlighted
Anonymous
Not applicable

Re: Changing value types in power bi

Thank you so much for your response but I could not understand it well. 
As you can see below: My data is like that and when it comes to build line chart on the axis it shows mixed hierarchy.

Here is the detailed view. Table view.PNGgraph view.PNG

Highlighted
Super User IV
Super User IV

Re: Changing value types in power bi

@Anonymous , Did not get the error from the screenshot.



Did I answer your question? Mark my post as a solution! Appreciate your Kudos!!
My Recent Blog -Week is not so Weak Connect on Linkedin

Proud to be a Super User!

Highlighted
Anonymous
Not applicable

Re: Changing value types in power bi

On the Line chart image take a look at x axis of the line chart.

Highlighted
Microsoft
Microsoft

Re: Changing value types in power bi

Hi , @Anonymous 

Try steps as below:

1.chose field "year " and right click to choose "new hierachy"

 

01.png

 

2.right click field "Quarter" to choose "add to hierachy" ->"Year Hierarchy"

02.png

it will show  as below:

03.png

 

3. Then click "..." in visual to  choose " sort ascending " ,"sort by Year Quarter"  

04.png

 

4.The result will show as below

05.png

If I misunderstand something ,please let me know.

Best Regards,
Community Support Team _ Eason
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

 

 

View solution in original post

Highlighted
Anonymous
Not applicable

Re: Changing value types in power bi

It works now, thank you so much 🙂

 

Helpful resources

Announcements
Community Blog

Community Blog

Visit our Community Blog for articles, guides, and information created by fellow community members.

Using the Community

Using the Community

Need help with the Power BI Community? Our 'Using the Community' support articles are a great place to start.

Community Summit North America

Community Summit North America

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

Power Platform 2020 release wave 2 plan

Power Platform 2020 release wave 2 plan

Features releasing from October 2020 through March 2021

Top Solution Authors
Top Kudoed Authors