The ultimate Fabric, Power BI, SQL, and AI community-led learning event. Save €200 with code FABCOMM.
Get registeredCompete to become Power BI Data Viz World Champion! First round ends August 18th. Get started.
Date | Clicks |
9/26/2016 | 6919 |
10/3/2016 | 5005 |
10/10/2016 | 6904 |
10/17/2016 | 9849 |
10/24/2016 | 7330 |
10/31/2016 | 6620 |
This is my data. But when I try to show data in Clustered Column Chart , Date is dispalyed like in picture below.
I also change DATE format to Text Format but Date Heirchy is not showin right as shown in figure below..
Can anybody help me?
Hi @sewaktamang,
Please follow steps below to display date as it is in Chart.
1. Change the type of Date column back to "Date".
2. Use "Date" instead of "Date Hierarchy" for Axis of the Chart.
3. Change the Type of Axis to "Categorical" in Format tab for Axis of the Chart.
Then you should get the result you want.
Here is the sample pbix file for your reference.
Regards
This was a very helpful answer, thank you!
It is surprised to me that when I copy & paste the sample data and tried to convert the data type to date, some of the rows were throwing errors while others were converted to date data type.
Do you know what could be the possible reasons for that?
Hi @BhaveshPatel,
That's a little weird. I just copy & paste the sample data and the data type of "Date" column is identified as Date without any converting. I am using the latest version of Power BI Desktop(2.40.4554.463 64-bit (October 2016)), and the locale to "English(United States)".
Regards
To add up more in what suggested by GUAVAQ,
You can also split the Date column by "/"separator at each occurances in Query Editor and then move the day column first.
Now, Select Day, Month and Year Columns and Go to Add Column Tab and use Merge columns options. Use "/" separator to combine all the columns and set the data type Date.
This will fix the issue with your date column.
The problem with your date column is that it has extra spaces in them and when you tried to set the data type date, it shows the errors.
@sewaktamang I would suggest making sure that your column data type is set to Date?
As well as ensuring that the date format is as you want it to be?
Another option is to use a date table and create a relationship from your table using the Date column to the Calendar Date Column in the date table.
You can find this blog post here, which explains how to quickly and easily create a date table.
User | Count |
---|---|
87 | |
84 | |
36 | |
35 | |
30 |
User | Count |
---|---|
95 | |
74 | |
67 | |
52 | |
51 |