Google charts table random display - google-visualization

I have multiple tables in my app. In the app I cannot control the numbers of columns of the strings lengths in the column. Also I cannot control the numbers of columns of the orders of the columns.
Right now i have 4 tables in a set and one table in another set. I will put only the headers as the other data is confidential in this image.
The problem I encounter is: since the string length in a column in the table is not the same as the same column in other table. The width of the columns are not the same within a table set. I have tried to check on page load the length of the columns but the tables is not drawn on page load. When i say a table set i refer a list of tables with same properties, same columns number and name.
I cannot set fixed size on a certain column because I am not able to know if for next table set how the columns distribution is.
How can I make all the columns to look alike? How can I catch event when the table is fully drawn?

Related

Line chart with two value variables showing one as total sum and the other as actual values

I am attempting to create a line chart with two separate lines, by applying separate filters. To do so I have used slicers to create two tables CF1 and CF2 which is the original data filtered for the respective filters on the LHS and RHS of the data below (using relationships).
However, when displaying the information on a chart the second set of data is showing as the sum of the values instead of values as CF1 is.
I have tried creating a line chart with only CF1 or CF2 as the values and that works without issue.
To make this happen you need a common X-axis column to establish the evaluation context.
Now you are using the date column from one of the tables, say Table 1 which causes the measure that scans your Table 2 to just sum all entries, since the evaluation context does not filter Table 2 at all.
Read up on calendar tables and implement that. There are plenty of resources on this on the Web. See this example from Radacad, for instance.

Power BI Sort - Hiding the sort Column

In a Power BI table, I am trying to sort a table visual with a sort column which is average orders per customer. The data in the FACT table is at order level. When I try to hid the sort column in the table visual, I change the column name from Average orders per Customer to *, lock the filter and hide it and then pull the lines in so the column appears hidden. However due to the size of the contents of sort column ( row values) like 28878, this means the rows get fatter and it looks weird as the row height is blown up. Is there a way in Power BI to sort a table visual without having to add the sort column to it or a way where the rows go not get bigger due to the contents of the hidden sort column ( settings) ?
With respect to your last question, you can turn off the auto-sizing of the column in the Format panel on your visual.
You probably want Word wrap off too.
You can use a white shape to cover the undesired column:
Insert > Shapes
Format Shape > turn off Fill and Outline
Format > use Bring forward or Send backward to get the shape covering the visualization.

PowerBI - Duplicate Entries in Query

I have created a query on three tables. Here there is a column GUID (which is actually unique), then there is a column date/time and a column with a phone number.
Now if the same phone number calls more than once, get duplicates with always the same GUID. Can I filter this in Power BI so that the ID only appears once?
If I understand your requirement correct, There is an option in Power Query Editor to remove all duplicate rows. You can first select your all 3 columns- guid, date_time and phone_number. Now right click on any of the Column's header and select Remove Duplicate from the list as shown in the below sample image-
This should keep only 1 rows per distinct combination considering 3 columns.

Power BI: Make a Table Visualization display all observations of a dataset

I've noticed that If you have a table in the Data Viewer in Power BI desktop such as this:
Then, if you insert the same table in a Table Visualization, the table will only display distinct values of the categories:
How can you set up a Table Visualization so that the data is displayed as it is in the Data Viewer where all observations are displayed?
Unfortunately, Power Bi Desktop currently does not have an option to display all observations in the Table Visualization(Oct 2018). I am optimistic the Power Bi team will correct this problem in a future release. If you feel strongly about this feature, please go to the Power Bi improvement Idea post and add your vote.
I'm answering this question to perhaps help others who come here looking for a work around until it gets implemented.
There is currently one work around that I know of: Add an index column to the data table, add this column to your table visualization, then shrink the column width of the index to hide the data. This is not a desirable work around, but might get you a solution in a pinch until the feature is implemented.
So for your example, to add an index column to your table, go to Edit Queries -> Add Column -> Index Column -> From 1
Then - back to your report, add the Index column to the Table Visualization and make sure you select Don't Summarize for the Index Column values tab pull down.
Once the index column is added to your table, and you sort by the index your table visualization should look like the following:
The last step is to hide the index column by shrinking the column width of the index column. Before you do this, you need to turn off word wrap for the columns and the values. Go to the paint roller and in Column Header and Values make sure you turn word wrap off:
then your final table will look like the following with all of the values required. The grey box is my mouse over the shrunk index column and wont show up for you unless you mouse over that area:

Comparing 2 Tables in PowerBI

Working on a way to compare 2 tables in PowerBI.
I'm joining the 2 tables using the primary key and making custom columns that compare if the old and new are equal.
This doesn't seem like the most efficient way of doing things, and I can't even color code the matrix because some values aren't integers.
Any suggestions?
I did a big project like this last year, comparing two versions of a data warehouse (SQL database).
I tackled most of it in the Query Editor (actually using Power Query for Excel, but that's the same as PBI's Query Editor).
My key technique was to first create a Query for each table, and use Unpivot Other Columns on everything apart from the Primary Key columns. This transforms it into rows of Attribute, Value. You can filter Attribute to just the columns you want to compare.
Then in a new Query you can Merge & Expand the "old" and "new" Queries, joining on on the Primary Key columns + the Attribute column. Then add Filter or Add Column steps to get to your final output.