How to show number of columns based on slicer in power BI? - sql

I have one scenerio which i need answer for.
Suppose i have a table with 10 columns.
Is it possible to show columns based on slicer.
Like if i select 3 from slicer then it should show only first 3 columns.
Similarly if i select 5 in slicer then the visual should show only first 5 columns.
I really need a solution for this problem. Let me know if any more details required. Thank you

Found an article regarding this please go through with this.
https://community.powerbi.com/t5/Community-Blog/Dynamic-Hideable-Columns-in-Power-BI-Table-Visual/ba-p/662808

If you want to hide/show column based on their name from slicer then please apply below steps:
Go to Transform Data & Select that column which you always want in your table.
Do Unpivoted other columns.
Use a matrix:
Drag static column in ROW of matrix.
Drag Attribute column in Columns of matrix.
Drag Values column in Values of matrix.
4.Drag a slicer & put attribute in Slicers.
Now you can choose column name from slicer which you want to add in your matrix.

Related

how to bing the grouped items to a non group section of a tablix

I need to have a graph the same size as tablix. Since i cant merge the cells , how can i bring the grouped items to the left ?
i have this
Before
and i want it to look like this:
After
But since the period is a group i cant merge the cells in the bottom, So is there a way to bring period colums to the left.
Thanks
If your chart and table use the same dataset (and why wouldn;t it if it showing the same data), you can put them in a list that will grow with the column grouping of your current table.
INSERT a new List. A list is really just a table.
Add an extra row to the list in the same group.
Set the Grouping on the list to Group By 1 (the number one). This will group everything to one line.
Set the dataset to the same dataset as your chart and table.
Set the list's top cell's size to match your table.
Put the table in the top row.
Set the bottom cell to the height of the chart.
Put the chart in the bottom.
The column grouping in the top will stretch out the list and the chart will go with it.

add numbers down a column in OpenRefine

I'd like to automatically number a column. Similar to Excel, where I can type "1" in one cell and the cells below it automatically get numbered 2, 3, 4, 5, etc. I don't know why I'm having so much trouble figuring out this function on Openrefine but any help would be greatly appreciated.
Thanks,
Gail
You can add a new column ("Add new column based on this column") with this Grel formula inside :
row.index + 1
The answer by Ettore Rizza already provides a solution for the common case. As the question author stated in a comment it does not work for his use case. He wants to add consecutive numbers to unfiltered rows.
For this you can use records. The basic idea is to create records from the filtered data and use the record index as counter.
Steps:
With filters active add a new column with the expression value.
Move the new column to the beginning to use it as records.
With filters still active add a new column (or transform the first one) with the expression row.record.index + 1.
Original
Filtered
Records
Index
A
A
A
1
1
2
B
B
B
2
C
C
C
3

Macro sum only filtered cells in table and copy to clipboard

I'm trying to do some data entry and was wondering if I could copy the sum of FILTERED data onto clipboard with a macro?
I have a macro that copies sum of selected cells, but when in a table format and filtering it seems to sum everything in that range too. Please let me know.
There are 1665 Rows total in my data table starting at 22.
Thanks!
No need to really use a macro, you can use the SUMIFS function https://support.office.com/en-in/article/SUMIFS-function-9dd6179e-cced-41dd-ac38-08fdf5b929e5 Basically you will use the criteria for filtering as the criteria for summing the values. I am not sure what your filtering criteria is, but let's you are filtering value that are great than 0 in column A rows 1 to 100.
SUMIFS(A1:A100, A1:A100, ">0")
Right click on the table and click Table->Totals Row to show a row at the bottom of the table for totals. It will only sum the visible rows of that column.

Display Value from PowerPivot FieldList

I want to show a value in a cell of Excel which is coming from PowerPivot Field List.
How to show its value in Cell?
You have a couple of options to show a value from a Power Pivot model in a cell in Excel.
1) Create a pivot table with only the values for the field that you want. You can do this by opening your Power Pivot model and clicking Pivot Table on the home tab. Locate the field you want and put it in the Rows. You can remove the grand total by going to the design tab in the PivotTable Tools group and choosing Grand Totals -> Off for Rows and Columns. You can type your own heading in the row that says row labels.
2) Use a slicer. Add a pivot table, then click Slicer on the Insert tab. Select the field you want to show and click OK. You can delete the rest of the pivot table if you don't need it.
3) Use cube functions. You can get a list of values for a certain dimension by creating a set and then cuberanked members. For example, I have a Power Pivot model with a field called cities. My cube set is in cell G1.
=CUBESET("ThisWorkbookDataModel","[Location].[City].[All].children", "Cities")
In the cells in column G below G1, I can copy the following cuberankedmember formula.
=IFERROR(CUBERANKEDMEMBER("ThisWorkbookDataModel",$G$1,ROW()-1),"")
This gets the list of members from the set in cell G1 and lists out the member in order. so you need to copy that to as many cells as there are values. I used ROW()-1 to create an autonumbered list that starts with 1. So in cell G4, I'm saying "get me the 3rd city. Since the number of members can change, I added the IFERROR. Normally, if you ask it for more members than are present, it will return #N/A. IfError catches that error and returns a blank string instead (this is purely for cosmetic purposes and can be left out).
You can see the results of the 3 options below.

Is it possible to force report column break on group?

I have an 2005 SSRS report that contains two tablix controls; and the report itself has two columns. What I'd like to do is force the tablix(s) to move it's data into the second column of the report; but I don't believe this is possible. For an example, my report in design view appears such as:
Col A Col B Col C | COLUMN 2
x x x |
And I am grouping on Column A, which has another grouping not shown named "ColumnGrouping" - which I want to force to group into the second column on the SSRS report. Is this possible?
Apologies in advance if the question needs further clarification - I can expound as need be.
So for those curious, it depends on the spacing of the columns - SSRS will do the math for you and if it decides that the width of the columns are greater than the column span, it will spill over into the next row.