I'm displaying my data in Power BI Desktop table visual using SQL Server Stored Procedure data source. I need data to be sorted in particular user-requested order (there are only 5 rows in the data output). For this purpose I did the following:
Created "dummy" column in SQL Server SP to reflect the ordering requirements (values 1-5)
Specified dummy column in Order By clause for SP output.
In Power BI Desktop I navigated to Power Query Editor and sorted data table by the dummy column explicitly.
Still, after all these steps, data in table visual is sorted differently. Please note dummy column is NOT displayed on table visual (and is not supposed to be). Also, NO manual sorting has been applied to the table visual (both Sort Ascending and Sort Descending options are blurred for the Table Visual).
How can I fix this issue?
Appreciate your help.
P.S. Here is the picture of not displaying Column Tools when clicking on a column:
https://i.stack.imgur.com/gTXFR.jpg
What you may want to try to do is select the column you want to have sorted and set it to sort by the dummy column you have created. This uses your chosen field as the display field but will sort it by your dummy field.
This is very commonly used when sorting months or days of the week where you want to see, say, a day name on an axis but don't want it sorted alphabetically but rather by the order of the day in the week.
Sample screen shot below taken from these PowerBI Docs.
Related
I am loading an Excel file, in which it has 43 rows, all the rows are identical. This is the only file I'm loading and there are no connections relationships in the model whatsoever.
When I plot my data into a table visual, and choose not to summarize any of my fields, Power BI still shows me one row. While if I change any of the field to do a count of it, it shows me correctly that I have 43 rows. I need to be able to see all the 43 rows in my table.
Why is Power BI summarizing my data even if I command it not to do so?
Am I missing something simple?
Input table as seen in Power BI data tab:
The visual I'm trying to create:
The table visual in Power BI behaves similar to a Pivot Table in Excel.
W/o an aggregation defined, the "Values" fields behave like "Rows" in a Pivot Table and you will only see distinct items or distinct item combinations. You have 43 identical records, hence it is represented as one row in the visual.
With an aggregation defined (Sum, Count, ...) the field behaves like "Values" in a Pivot Table, and you get the result of that aggregation, filtered by the distinct items/combinations to the left, which is again one row in your case.
If you just want to show all the records in a table visual, you'll have to make them unique. The easiest way to achieve that is by adding an index column in PowerQuery and then also showing that index in the table visual.
However, this is not exactly what Power BI is made for and you are probably better off by switching to something like PowerPoint instead.
And btw., newer show sceenshots in stackoverflow, always provide sample data instead.
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.
I'm having issues with these two time frames in my Power BI dashboard that are out of order. I'm wondering what I can do to fix this issue. I already sorted the timeframes to ascending and it didn't do the trick for me, unfortunately. Thank you!
It's sorting alphabetically. To fix this, add a column in the query editor that is either just the start date or end date of the Time Frame (make sure the column is a date type) and then use the sort by column feature to sort your Time Frame column by the new date column you just created.
Note that this probably won't work if you add the column as a DAX calculated column (rather than in the query editor) because it will throw a circular logic error (since the calculated column is dependent on the Time Frame).
I am new to Power BI and with the limited time given, I am stuck at how to come up with:
Below Table B-Row1 ("1/20" and "M"-Monday cell) - how to
specifically place the date measures in their specific cell and put
it in one column?
How can I merge the cells under the Total column?
How to add all the numbers from the Type1 and Type2 columns and place it in the merged cell in #2?
Any clues/direction/links on how to achieve the Target Table B below will be much appreciated.
PS. Below Table A. Current is just using Matrix Visualization in Power BI.
You can't exactly do what you are after. PowerBI allows you to rapidly put amazing visuals together however that comes at the price of lack of (easy) flexibility. You could build your own custom visual or look in App Source for a visual that does this, or build the Visual in some other tool (via custom code).
However, I'd recommend sticking with the PowerBI matrix, which will give you a cascading drill down and work out how best to align your data to it and other out of the box visuals. Once you start to delve in to convoluted work-arounds to give users data in exactly the format they request you start to burn a lot of time. Look for alternatives to tell the data's story and work with your end-user to buy in to it.
Just wanna share that I have resolved my problem not using one type of visualization, but through using 3 different visualizations in Power BI. I used:
1 Table visual for Date column
1 Table visual for Total column
1 Matrix visual for the Code+Type mapping and counts
I also used DAX function to get the Date format and another DAX function used for both Total and Code+Type counts(to filter data according to the specified date).
Thanks for the response, #Murray and #RADO.
It looks like Power BI is doing some form of SQL Union logic when combining data from two or more tables on a table visual.
In the image above you can see there are only two rows displayed. Within the data however there are in fact 4 rows, and all are valid to me. When I add another column that is distinct per row, it shows the data I expect. See image below:
I have two questions, can I change this default behavior?
If not, can I hide a column within a table visual while still having its data affect the display? That OrderDetailKey has no value to my users, which is why I didn't display it in the first place.