Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.
Hello Team, Need help to identify how many systems are newly added for every week Here is below sample. I need to create one column which can tell me if the device is repeated or newly added. Please help.
Also I have a second query. I have a data dump which doesn't have any date field and it only has system devices, model type and OS name fields. File will be uploaded in sharepoint where I will fetch the worksbook from sharepoint link into power BI I want to create a new column inside power BI which can display the upload date into one single column for the entire dataset. For example as below
Kindly help.
Solved! Go to Solution.
Hi @sowmya2553 ,
One sample for your reference, please check the following steps as below.
1. For the first query, We can create a calculated column as below.
Newly added = VAR a = CALCULATETABLE ( VALUES ( 'Table'[Serial Number] ), FILTER ( ALL ( 'Table' ), 'Table'[Week Number] <> MAX ( 'Table'[Week Number] ) ) ) RETURN IF ( NOT ( 'Table'[Serial Number] IN a ), "new added", "repeated" )
2. Insert index columns in both tables in power query.
3. Based on the index column, we can use LOOKUPVALUE function here.
Upload = LOOKUPVALUE ( 'Table'[Date], 'Table'[Index], 'Table (2)'[Index], 'Table'[Serial Number], 'Table (2)'[Serial Number] )
For more details, please check the pbix as attached.
You can try connecting to a Sharepoint Folder instead of the actual file. The process is very similar with connecting a folder locally or via network shares. With SP folder, you have to connect to the root folder and filter it to the folder you want to connect to. This way the metadata of the files in that folder will be available to you. This is a sample PQ of connecting to OneDrive for Business/Personal Sharepoint.
let Source = SharePoint.Files("https://tenant-my.sharepoint.com/personal/user/", [ApiVersion = 15]), #"Filtered Rows" = Table.SelectRows(Source, each ([Folder Path] = "https://tenant-my.sharepoint.com/personal/user/Documents/Subfolder1/Subfolder2/")) in #"Filtered Rows"
Proud to be a Super User!
Hi @sowmya2553 ,
One sample for your reference, please check the following steps as below.
1. For the first query, We can create a calculated column as below.
Newly added = VAR a = CALCULATETABLE ( VALUES ( 'Table'[Serial Number] ), FILTER ( ALL ( 'Table' ), 'Table'[Week Number] <> MAX ( 'Table'[Week Number] ) ) ) RETURN IF ( NOT ( 'Table'[Serial Number] IN a ), "new added", "repeated" )
2. Insert index columns in both tables in power query.
3. Based on the index column, we can use LOOKUPVALUE function here.
Upload = LOOKUPVALUE ( 'Table'[Date], 'Table'[Index], 'Table (2)'[Index], 'Table'[Serial Number], 'Table (2)'[Serial Number] )
For more details, please check the pbix as attached.
Hello There,
Thank you very much for the quick help.
It worked 🙂
However my last query regarding the second query is as below.
For suppose the below table is the only single table which I have and it doesn't hold any date columns in the entire table.
and this excel file gets uploaded in share point. Power BI should fetch whatever is the upload date/time in SP (last modified date) into one single column as shown below second sample table.
Please suggest.
Your below second qery helped in giving the relation to other tables where the date column is already available in one of the tables. But I am looking for the date column to be created automatically and fetch whataver is the upload date in SP.
You can try connecting to a Sharepoint Folder instead of the actual file. The process is very similar with connecting a folder locally or via network shares. With SP folder, you have to connect to the root folder and filter it to the folder you want to connect to. This way the metadata of the files in that folder will be available to you. This is a sample PQ of connecting to OneDrive for Business/Personal Sharepoint.
let Source = SharePoint.Files("https://tenant-my.sharepoint.com/personal/user/", [ApiVersion = 15]), #"Filtered Rows" = Table.SelectRows(Source, each ([Folder Path] = "https://tenant-my.sharepoint.com/personal/user/Documents/Subfolder1/Subfolder2/")) in #"Filtered Rows"
Proud to be a Super User!
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.