PowerBI not showing date on X Axis? - powerbi

I have a dataset that looks something like this
I want to plot a given "owners" spend over time. So basically I want to groupby owner and plot their total spend throughout the year. However when I try to do this in powerBI it wants to put the owners on the X Axis for some reason. Normally in Excel you can address this by simply selecting "swap axis" but don't see a way to do that in powerbi.

If you expand the Visualizations pane (on the right) and select the Fields button (a white bar chart icon, beneath the table of Visualization types), then you can drag the data fields into any "Field Well" (e.g. Axis, Legend, Value).
That said, I suspect that you will need to reshape your data back in the Query layer, using an Unpivot transformation to cover the monthly columns (e.g. Jul-15, Aug-15 etc) into a pair of Attribute (Month) and Value ($) columns. This will allow charting Months on an Axis and filtering by date (e.g. last 6 months).

Related

How to show y axis text labels instead of the count in power bi

I am fairly new to power bi and I am trying to create a stacked bar chart of two columns ( one column contains type: individual, Business and government. a second column contains new connections, complaints , etc) I want to create a stacked bar chart with the type on the x-axis and the reason on the y axis. so what I did is this:
the x axis shows the 3 types: government, individual and business but the y axis shows 0,50,100 and not the actual labels ( new connections, complaints,...). is there a way to show the text ( new connections, complaints, etc) on the y-axis instead of 0,50,100
this is the columns:
I tried to change the count in the y-axis but there was no button for it, I need to change the y axis labels to the text inside the actual column instead of the current numbers, is there a way to do this?
Hello there should be a button for it as in the image below.
Like the red arrow shows, and you can change it there

Power BI - stacked column chart / visualizing counts per month

I'm a newbie in Power BI and I'm now stuck with a visualization problem. I have an Excel table with columns about (1) the title of a news article and (2) the date when it was published. As seen on the screenshot from Excel, there are months on which nothing was published.
I need to make a stacked column chart in Power BI from it. First, the one I made shows only years, while I want to see months. Second, I'd like to see each month, including those that have the value of 0 (i.e. nothing was published on this month). Thus my aim is to have 48 month columns instead of my 4 columns for years. Thanks a lot in advance!
Initial data, Excel
The Power BI stacked column chart that I want to tweak
I assume you are using auto date/time in Power BI Desktop, for simplicity:
Create a new bar chart visualisation
Drag the Date column into the Axis field
The Date column should transform into a hierarchy - remove Quarter from this hierarchy
If the Date column does not show up as a hierarchy, right click Date in the Axis field and select Date Hierarchy
Drag the Title column into the Values field
Right click Date in the Axis field and tick Show Items With No Data
Click the visualisation in the canvas and press the button that looks like one arrow that splits into two arrows, to expand all down one level in the hierarchy
This should get you what you are after:
You can deselect Concatenate Labels for your X-axis to get this result.

Is there a better way to plot data on a bar chart in Power Bi?

I am working with an imported data set from Excel, for each row there is a volume for each year 2020-2030 as an individual column.
Trying to plot the sum of each column 2020-2030 in a bar chart however this does not display as expected. See attached images. Already tried adding the data to the Axis field but this does not work.
The goal is to have a plot with years 2020-2030 on X-Axis and total volume on Y-Axis, then clicking on an individual year will then filter related plots by year. So far I can only sort the data in the opposite direction clicking on a category to see the volume for a single year.
Looking for help on how to plot the data specifically and then how to link this plot to other visuals in the report.
Bar Chart Created
Layout of Data
You will need to unpivot your data in m-query editor. Click on "transform-data". Select the table your data is on. Click the transform TAB. Select the year columns and click unpivot.
Now you get a table with many more rows wtih data like CY 2020, CY 2021 etc
You need to convert this to a number. you can do this by adding a column which picks up the 4 right chars and converts it to number:
Goto tab "Add Column", click Custom Column. Give column name and type:
Number.FromText(Text.End([YourColumnwiththeCY2020],4))
To make it even better, delete the column you had created during the unpivot. On this table you can do the graph representations..
apply and close to go back to your dashboard
Use unpivot in PowerQuery (M) to turn the columns for each date in to a single column containing the period with values (CY-2020, CY-2021, CY-2022 etc). You can remove the CY- and turn this in to an integer column, or convert it to a date, e.g. 1/1/2020. This will plot far better on your chart as an axis as opposed to the multi values approach in you screen shots.
See a blog post from Radacad here that provides a how to.

Power BI. Drill down on pie chart by filtering

I have a pie chart which shows the distribution of groups, and when I drill down on it, it will show the distribution of departments by selected group. I also have a slicer to filter the pie chart by groups.
I want to be able to drill down to the second level. Basically getting to the second image by using the slicer. Is it possible in Power BI, or do I need custom visuals?
Ok, I have a 'hack' for you to consider.
1) Create two pie charts, one for group and one for department
2) Add a row to your dataset
Group:"_All" | Department:"_All"
3) Modify your interactions so that chances to the slicer don't filter the 'Groups' pie chart
4) Add a filter to both of the pie charts to exclude group _All
5) Drag the Department pie exactly on top of the Group pie.
When you have _All selected in the slicer, that will collide with the filters in your departments pie, it won't show anything at all, and the 'Groups' pie will be visible underneath. Otherwise, filtering for any of the other groups will cause the Departments pie to show on top, filtered properly.
There's a lot of drawbacks. Data labels, differences in size, titles -- all that stuff has to be turned off because they cause overlapping and it looks horrible. Mouseover is a little weird, and all cross filtering / highlighting from other visuals has to be considered and managed.
But, in the golden path, it will at least look like it's supposed look.

Line Chart - show / hide display Y-Axis data in datatable for chart

For the line chart, I have 2 Y-Axes data for the DataTable and they are displayed great on the chart. The situation I have is the 1st Y-Axis data is Historical value and the 2nd Y-Axis is the Estimated Forecast.
What I want is the Historical data chart-line to be display and hide the Forecast data chart-line until it reach a point where the display lines is flipped over (start permanently hide the historical line-chart and start showing forecast line-chart).
What property or object am I looking for that deal with show and hide data?
Thanks...