Sort visualization data using a column not displayed - powerbi

This may look like a rookie question but in PowerBI, is it possible to
Not sort the data in a visualization (keep the natural order from the query)
If the answer to 1 is no, sort the data using a column that is not displayed in the visualization (for instance, sort table rows by an index that is not displayed in the table)
I found a workaround for charts (using the sort column as tooltip, the sort column becomes available in the available sorting columns) but I didn't for tables.

Edit: You can insert any column under Tooltips and it will be available for sorting in the same toolbar as in the screenshot below. Take a look at the answer here for further details.
Regarding:
Not sort the data in a visualization (keep the natural order from the
query)
I recently had problems with categorical data being sorted in a Visualization in a useless way, and not in the same way as in the query (or table in Power Query Editor). And If I'm not missing the point completely, you should be able to sort your data as you like by clicking the three dots in the top right of your visualization:

Related

How to disable the sorting axis option in Power BI line chart?

I have some data coming from a SQL Server query and the table looks as shown in the next figure:
If I display this in an Excel chart, it looks like the following picture:
As it can be noticed, in Excel the chart displays the data according to the order they have in the table.
When I tried to show this data in a Power BI line chart, it looks like the following picture:
Because the data is sorted by the occupancy values.
I do not want the data sorted as Power BI does. I want the data in the same way they are in the table. Any ideas about how can I do to disable the sorting axis option?
This should be rather simple.
Just click on the field that is currently used for the sorting, once you click it, the sort goes away completely.
See demo:
Sort actived:
Sort deactivated (clicking on Count of Status):

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.

Re-arrange bar chart in Power BI

I got a bar chart and I need to re-order the bars show in it. The bars show at which speed a person was driving and are currently sorted by the one that appears most often.
The data is imported in the structure:
The fields named *_id are used for filtering. What is shown in the bars is the count of the gemeten_snelheid column.
As shown in the bar chart the speeds are not sorted by "speed" but by count. Is it possible to re-order the bars so they are arranged by speed, and how would this be done?
I don't really know how to create a working example of this as the data is imported from a database connection, so if any more information is required feel free to ask.
You could create a new column and order by it, you could do it in sql, for example:
case when column1<30 then 1
when column1<40 then 2
when column1<50 then 3
column1_sort
Or you can do it in PowerBI, you could Add Column -> Conditional Column and write your Ifs. Or you can when in PowerBI desktop right click table, select New column and write something like:
Column_sort = if([Column1]="<30",1,if([Column1]="<40",2,if([Column1]="<50",3,4)))
Then select your not sorted column (Column1) and under Column tools there is Sort by column, and from there select column1_sort
Did you tried this below option? Here I am getting your expected output-

Is there a way that POWERBI does not agregate all numeric data?

so, I got 3 xlsx full of data already treated, so I pretty much just got to display the data using the graphs. The problem seems to be, that Powerbi aggregates all numeric data (using: count, sum, etc.) In their community they suggest to create new measures, the thing is, in that case I HAVE TO CREATE A LOT OF MEASURES...Also, I tried to convert the data to text and even so, Powerbi counts it!!!
any help, pls?
There are several ways to tackle this:
When you pull a field into the field well for a visualisation, you can click the drop down in the field well and select "Don't summarize"
in the data model, select the column and on the ribbon select "don't summarize" as the summarization option in the Properties group.
The screenshot shows the field well option on the left and the data model options on the right, one for a numeric and one for a text field.
And, yes, you never want to use the implicit measures, i.e. the automatic calculations that Power BI creates. If you want to keep on top of what is being calculated, create your own measures, and yes, there will be many.
Edit: If by "aggregating" you are referring to the fact that text values will be grouped in a table (you don't see any duplicates), then you need to add a column with unique values to the table so all the duplicates of the text values show up. This can be done in the data source by adding an Index column, then using that Index column in the table and setting it to a very narrow with to make it invisible.

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: