I am new and pretty inexperienced with Power Query, so have struggled with this issue and finding a basic tutorial on Power Query.
I am using Power Pivot to analyse some data. My source data is added to the Excel Data Model using Power Query from an external CSV file.
What I want to be able to do is create a summary table from the source data in a new table. This new table would be added to the data model. My source table (SrcTable) would look like this;
Order ID
Item Code
O-001
I-001
O-001
I-002
O-002
I-001
O-003
I-001
O-003
I-002
O-003
I-003
My new table would have two columns
A list of each Item Code
A Distinct Count of Order ID for each Item Code
So for the example above the SummaryTable would look like this
Item Code
Num Orders
I-001
3
I-002
2
I-003
1
Can someone please give me some guidance on how can I write a query to create this new table for me?
Thanks
Select your table using data...from table/range... to get it into powerquery
In powerquery
right click the Item Code column and choose Group by...
It should default to doing a count. You can change the name of the column from Count to Num Orders if you want. Then Hit Ok
The do File .. close and load to ... and decide how you want to get the data back into Excel. There is an optional [x] checkbox to add the data to data model
I have a Google Sheets pivot table with sales values of transactions in descending order. I want to modify the pivot table to only show the Top 10 sales values. The source data for the pivot table is being updated daily, so naturally, the Top 10 values will be changing as time progresses.
How can I do this in Google Sheets?
directly in the pivot table, it's not possible so you need to use some formula to trim it and then use pivot table from there:
=QUERY(A:B, "limit 10")
There is a good function in Google Sheets called SORTN which return any number of values in a range sorted as you want.
Use it on another sheet, the data will update automatically when value in the source range change.
There are two Tables having their own dataset on my report :
I want to place the second Table at the right of the first one. How to do that ?
Just place the two tables in a grid with two columns.
You could even use a third table to do that, but I would use grids if it is only for positioning.
I have a CSV file that looks like this. It is in matrix form where cell A1 is empty. I want to visualize this in Tableau like this
a1,a2,a3
a1,1,0.2,0.3
a2,0.3,1,0.5
a3,0.6,0.7,1
How can I build this in tableau to show a matrix?
I tried putting measure name in both the row and column field and measure values in the marks text box but i ended up with diagonal values which isn't what i want.
First structure your data in the form of a table.
A well structured CSV file for Tableau (and most tools) has a single header row that labels each column (so skipping the first cell in the header row is a problem). Then each data row that follows contains only values in each field separated by columns (so there should be no leading row labels)
Order is not significant in a relational table. The rows in a table form a set, not a matrix.
So your CSV should look something closer to
field_name_1,field_name_2,field_name_3
1,0.2,0.3
0.3,1,0.5
0.6,0.7,1
Normally, the prime use of Tableau is display an aggregated summary of the data, not to display each individual data row. So you can put measure_names on columns and measure_values on the text or label shelf to get a summary of each measure (by default a sum)
If all you want to do is to view the underlying data rows in a table for diagnostics, the easiest way is to use the view data button or menu command.
If you want to build a visualization that displays all the data (without summarizing it) in a table, you have two ways to go. The simplest is if you have a unique primary key in your data, you can place it on the row shelf to get a row in your viz for each row in your data.
If your data rows do not have a primary key, you can turn off aggregate measures from the Analysis menu, but then you'll see multiple values in each table cell. Then to get a row in your viz for each row in your data, put the calculation index() on the rows shelf and change it to discrete.
I have a table in Tableau that is based on a MTD calculation. It gives multiple values for different departs on each day of the month. This table is linked to another sheet that I click on to choose the value in the table that I want to see.
Right now I only highlight that value in the table. I want to be able to pull one specific value out and display by itself in the dashboard close to the chart.
How do you pull a value from a table and display.