This is how my table looks like in Power BI Desktop:
In the 1st column, we have the year, and in the n remaining columns the indicators.
I'd like to build a matrix visual with the indicators in the rows and years in columns.
Now, I know I can unpivot all the columns except the year in the query editor. But the structure above is necessary to build charts where the x-axis is the year and the series is only one or two indicators.
Is there a way (a measure, calculated table or other) to build the matrix I need?
Thanks!
If I understand correctly, you want both your original table layout and a new transposed table like this:
You can do that with a new, additional query.
Just go into your query editor and right click on your existing query (in the left pane of the screen), and then click Reference. That will create a new query, using the previously existing query as its source.
Then click the Transform tab. Then click the bottom part of the "Use First Row As Headers" button, so that you can then click on "Use Headers as First Row".
Then click on Transpose.
Then click on the top part of the "Use First Row As Headers" button (or click on its bottom part and then "Use First Row As Headers")
Then click on the Home tab and "Close & Apply". This will add a new table to your Power BI data set, from the transposed table.
Open the excel data you want to transpose in power query editor.
go to transform tab.
and drop down "use first row as header" and select "use header as first row" -> this will add one more row at the top of the data as shown in the second screenshot1
2
and then click on transpose button. you can see the data has been transposed.
3
If you want to remove the first row, drop down "use first row as header" and select "use first row as header"
Related
I have found a way to hide a column in the matrix visualisation in Power BI but not in Paginated report, hence question.
In the Design view, you can hide a column by right clicking the column header and selecting Column Visibility...
then select Show, Hide, or based on an expression
To tie showing or hiding the column based on a drop down, create a parameter by right clicking Parameters in the Report Data pane and selecting Add Parameter...
Here are my settings for the parameter:
General tab:
Available Values tab:
Default Values tab:
Once you have the parameter set, go back into the Column Visibility settings, select based on an expression and click the fx button:
Then click Parameters and double click your parameter name to add the expression:
When you run the report, you'll see the drop down and the default setting:
You can then change the drop down and click View Report to see the hidden column:
Hi all,
I have a table in PowerBI as shown in the screenshot above. I want to remove the rows in the table where column D is empty. So in the example above, the rows that should be removed are row7,8,9,10. In Power Query Editor, I'm only able to remove the rows if the entire row is empty.
May I know how should I remove row 7-10 in PowerBI? In future, if the data for row 7-10 in column D are available, then it will be restored back. Is this possible to achieve? Any help or advice will be greatly appreciated!
You can do as #Jeroen Mostert mentioned in his comment, within Power Query, or if you are just trying to display the table as a table visual in Power BI like this...
...then you could just filter the table visual by the column with blanks within Power BI without doing anything in Power Query.
To filter the table visual:
select the table visual
then, in the Filters pane, find the section about your column named Final, and then select "is not blank" from the drop-down selection below "Show items when the value"
then click Apply filter.
This screen snip shows the table visual selected and the Filters pane visible with "is not blank" selected in its drop-down.
I am attempting to create a cumulative graph much like this one:
I have the following table in PowerBI
BugHistory
BugID
Date (date)
DateTo (date)
EntityStateName (text)
Effort (number)
I would like to do a measure that would tell me the amount of summed Effort on any given date for each EntityState.
I have tried quite a few things, even adding a Date Table using the Calendar, but getting the values to be shown correctly on a StackedGraph seems to be beyond me.
Hope someone can help.
Follow the following steps:
Right click on the column "Effort" and click the option called "New quick measure" in the right click menu.
In the window that appears, choose "Running Total" under the Calculation drop-down
This will show 3 new fields
In the Base Value field, drag and drop the "Effort" column
In the Field column drag and drop the "Date" column.
In the direction column choose Ascending
This will create a new measure in your Table. You can use that measure in you chart.
You can refer to the following video for reference: https://youtu.be/KlXclbN4oWE?t=497
I am trying to build a custom table from three different source tables.
There are three column names, common in these source tables. I want to build a custom table which has all of those records from these tables.
The operation involved here is appending records on the basis of column names in all the source tables.
Here is a copy of what I require
How to do this PowerBI?
I'll assume you have all three source tables loaded into your Power BI Desktop.
Click the "Edit Queries" button in the ribbon...
...to open the Power BI Query Editor (PowerQuery).
Then click the "Home" tab, then the drop-down arrow next to "Append Queries", and click "Append Queries as New":
Select the "Three or more tables" radio button, and make sure all all three tables are listed in the "Tables to Append" list, so the dialog box looks like this:
...and click OK.
It'll create a new appended table, named Append1, that looks like this:
Then click the "Home" tab, and "Close & Apply" to load the new "Append1" table into Power BI.
(If you don't want the "Age" column included, you can remove it before you "Close & Apply." To do that, just right-click the "Age" column and select "Remove.")
I have a table of member IDs and transactions in Power BI, I would like to create an index column for it, any suggestions?
Regards
My preferred method is to use PowerQuery (Power BI's Query Editor). Here's how:
Click the "Home" tab in Power BI and then click the "Edit Queries" button.
Then, under "Queries" on the left side of the screen, click on the name of
the table you want to add the index to.
Then click on the "Add Column" tab and then click the "Index Column"
button. (If you click the down arrow beside the Index Column button,
you can decide what number to start the index with.)
Then click "File" and "Close & Apply".