I have a SharePoint list containing a column with data type People or Group which can contain multiple people. When this list is imported into Power BI it appears as [Table] in the Power BI Query Editor.
When I expand this column (using highlighted button above), it creates multiple rows (which I don't want).
My goal is to preserve the row count of my table by converting all duplicate rows created by the expansion back to single rows with a delimiter between values. Has anyone found a way to consolidate this?
Data example
Original Data
ID
ColumnHeader
OtherColumns
1
[Table]
OtherData
After expansion
ID
ColumnHeader
OtherColumns
1
FakeEmail#email.com
OtherData
1
FakeEmail2#email.com
OtherData
Target output
ID
ColumnHeader
OtherColumns
1
FakeEmail#email.com# FakeEmail2#email.com
OtherData
*The delimiter can be anything (not neccesarily a #)
Assume you have a table like this.
Table (in green) contains data structured like this.
To achieve the concatenation you're after as follows:
Add a custom column with the following code.
Text.Combine([ColumnHeader][Column Header A],"# ")
Related
i'd want to know if is possible use code for create all schema of power bi (tables, name of all columns).
This becouse i've several db with a schema like this:
tables with same structure that contains data (example: product(column name X01) , customer(column name X02), qty (column name X03), amount (column name X04), month (column name X05) etc.
a table that contains the name of all tables with data (with the same structure) example named TAB1
a table that contains the name of all columns inside tables data example named TAB2 (example X01 product, X02 customer, etc.)
So what i'd like to do (if possible) is to import all tables specified in TAB1
change the name of columns as specified in TAB2
There is a way to do all this via code and not manually, if so, what is the language and where i can find some resources ?
thanks
i've tried to search in internet but i've not found anything
I have my data source something like below.
I need to show output in the report as below.
I tried using the unpivot column and getting something like this, how to count the occurrence value of each Business value.
Plot following mesure against Value column (from your unpivot table):
Business Occurance = COUNTROWS('your unpivot table')
We have to remove the Attribute column as the next step to Unpivot. Then my table should be looks like this.
Now create a new table with following Dax function, let's say the current table as Business Data (Your Unpivot table)
Occurrence Table = DISTINCT('Business Data')
Now end result table should look like this,
You can make use of this table for your table visual in the report.
Note: You can add n-number of rows and column into your source table and this logic will do magic to get the correct result.
I have marked two places first marked place you have to add Value column then click second marked place one dropdown value is open click count menu
I have imported a JSON file into PowerBI and it contains a column in which the values are of type "List". I am looking to expand that column into multiple columns.
Specifically, the data contains a Sprint Name, the start date and the end date of the sprint, along with some other values associated with each sprint.
Trying to use "Expand to new rows" duplicates each sprint instance, creating a table that looks like this, duplicating each sprint instance multiple times for each associated value:
Sprint Name Value
JAN(S1Dev) 2019-01-01
JAN(S1Dev) 2019-01-13
JAN(S1Dev) {attribute}
JAN(S1Dev) {attribute}
JAN(S2Dev) 2019-01-14
JAN(S2Dev) 2019-01-31
JAN(S2Dev) {attribute}
JAN(S2Dev) {attribute}
FEB(S1Test) 2019-02-01
FEB(S1Test) 2019-02-15
... ...
I would like to do something similar to the "expand" feature, which instead creates a new column with each attribute rather than a new row. This is currently vastly increasing the size of my table for no reason, while also making the data practically un-useable. Any help would be appreciated, cheers!
I have found a very simple solution to this, but as it took me some time to figure it out I will answer my own question instead of deleting it to help others in the future...
Upon importing the JSON data into PowerBI first select "Convert to Table" to view the data as a table with editable properties.
Next, click the arrows pointing away from each other at the top of the column of Lists, and select "Extract Values".
Select a delimiter to use for concatenating values, I am choosing a comma since I know that the data contained within the list does not have any commas in it. If your data contains commas within it, choose something else. Similarly, if your data contains one of the delimiters, do not choose that as the delimiter.
It should now display a comma-separated list where it previously displayed "List" in orange text.
Now, right-click on the column and select "Split Column" then choose "By Delimiter"
Select the delimiter that you previously chose, and under "split at" select "Each occurrence of the delimiter" then click OK.
Your column should now be split into multiple columns based on the list!
Using Google Sheets, I'm trying to do something specific that is apparently un-searchable (zero results).
Sheet 1 contains data in column A. I want to import the data in Columns A and B to their respective columns on Sheet 2, but only if that same row also has (literally any) data in Column C.
maybe this in Sheet2!A1:
=ARRAYFORMULA(IF(LEN(Sheet1!C:C), Sheet1!A:B, ))
or perhaps this:
=ARRAYFORMULA(IF(LEN(C:C), Sheet1!A:B, ))
I have this table in Power BI, But I can't do another table.
How I can do this?
Now the values are grouped by date (different fields have information under one date, next the same fields are grouped by another date)
I want the values in the columns to be grouped by field (one field has date information next to it).
Edit1:
I can't set Date on the 2nd place in the grouping
Because date is column, traffic,orders,rev,costs- are values
You need to set Date on the 2nd place in the grouping, after a field containing traffic, orders, etc.
EDIT:
You need to unpivot these columns first, for example, in PowerQuery. Use Edit Query. This results in transforming your 4 columns to 2: Attribute and Value. Attribute will be your first grouping parameter. 2nd will be Date. Value column goes to values.
If you need your source query somewhere else, you may create new query for this very report only. It is done by first right-clicking original one and selecting Reference Query, and the doing any edits. This will keep original query intact.