about columns filled with 'table' and 'value' in dimension tables queries within power query - powerbi

While working on power query in power BI desktop, as I opened each Dimension table queries, I found the right corner columns of each table have one or two columns with 'table' or 'value' as values;
Would anyone help me understand,
what do they indicate?
why are they clickable and when clicked, they are removed automatically.
Thank you for giving your valuable time!

Actually the text "Table" is what it is. In there is a table with columns and rows. By clicking on the "Expand". PowerBI will open the table and "Paste" the columns to your sheet.
It is logical when you think about it because you are looking at a dimension table.
As for the "Value" in your DimProductSubcategory, I am not 100% sure(might be j-son or xml). What you can do is click on it, it will show you what is in there, it does a drilldown. If it asks a question are you sure, press no and copy the query first so you have the original.

Related

PowerBI Dynamic Columns slicers

I have tabular powerBI reports where few columns gets populated dynamically ( Like Year2022 , Year2023 ) within source query.
Report looks something like attache image.
Now Business Require slicer/Filter in such a way that He can filter those dynamic columns and he gets control to show and hide columns based on slicer selection with report.
I have find the solution but that is more suitable for filtering Static Columns , Is there any way we can filters Dynamic Columns through slicers .
Since Dynamic Columns numbers not fixed sometime ,
For one data refresh i can see Year2022, Year2023 and for other Year2025 ,Year2026.
Any solutions, direction will be appreciated
enter image description here

How to remove the empty rows in the table in PowerBI?

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.

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-

Show/hide columns in a matrix visual Power BI based on slicer (other table)

I have a table with A LOT of columns. But based on the slicer selection only a few of them must be shown. Every option of the slicer must show only a couple of (different) columns. To make a slicer for the selection of the columns is not really an option, because the end-user doesn't know which columns he must see with that selection.
The columns that must be hide are only having 'null' values on that selection, so I was thinking about some IF statement in which you're comparing the amount of rows with the amount of blank values in a column (that is a huge amount of work for all the columns, but I don't have a better idea). But then I have to have a statement for show or hide and there I got stuck.
So if you know how to make this statement, or you have a better idea it would be great if you would share this. Thank you in advance!

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:

Categories