I have the list as below:
List 1:
CustomerCode | CustomerName | ProductName | ProductCode | ManufactureDate | ExpiryDate | ProductPrice
*CustomerCode and CustomerName can have duplicate values
List 2:
CustomerCode | AmountPurchased
What I want to achieve:
I want to automatically populate Sharepoint List 2 with Power automate.
Condition:
CustomerCode cannot be duplicated.
I want to group List 1 by CustomerCode and add the AmountPurchased by the customer and fill in List 2.
I am new to Power Automate. Your help and assistance is highly appreciated. Thanks !!
https://powerusers.microsoft.com/t5/General-Power-Automate/Sum-a-column-from-one-sharepoint-list-with-a-condition-to/td-p/122078
Well documented already in this post :-)
Related
I am very new to kql, and i am stuck on this query. I am looking to have query display which users have had sign-ins from different states. I created this query, but i do not know how to count the results in the column "names".
SigninLogs
| project tostring(LocationDetails.state), UserDisplayName
| extend p =pack( 'Locations', LocationDetails_state)
| summarize names = make_set(p) by UserDisplayName
This generates a column "names" with a row like so:
[{"Locations":"Arkansas"},{"Locations":"Iowa"},{"Locations":""}]
Here is a simple query that grabs all sign-ins from users and another column with the locations.
SigninLogs
| where ResultType == "0"
| summarize by UserDisplayName, tostring(LocationDetails.state)
Is there a way to combine the duplicates of users column, and then display each location in the second? If so, could i count each location in order to filter by where location is > 1?
I am looking to have query display which users have had sign-ins from different states
Assuming I understood your question correctly, this could work (using array_length()):
SigninLogs
| project State = tostring(LocationDetails.state), UserDisplayName
| summarize States = make_set(State) by UserDisplayName
| where array_length(States) > 1 // filter users who had sign-ins from *more than 1 state*
I my beginner to PostgresQL,Can u please help me in the below issue
I have master and detail table like this
enter image description here
if image is not clear,I am giving sample like this
master table detail table
----------- --------------
dept_no dept_name dept_no emp_no emp_name emp_desig
1 Marketing 1 E001 saritha Sales Manager
2 R&D 1 E002 latha Sales Executive
3 HR 2 E003 veena Coder
4 IT 3 E004 geetha Manager
5 Testing 3 E005 Kavin Field Officer
I need the result something like this below,which should include dept_name having null values also,
dept_name emp_name
Marketing saritha,latha
R&D veena
HR geetha,kavin
IT
Testing
Can anybody help me in this query,Thanks in advance.
A possible solution:
select dept_name, string_agg(emp_name,',')
from master
left join detail
on master.dept_no = detail.dept_no
group by master.dept_no, dept_name
order by master.dept_no;
dept_name | string_agg
-----------+---------------
Marketing | latha,saritha
R&D | veena
HR | kavin,geetha
IT |
Testing |
(5 rows)
So, I have list of dictionaries like this
dnc_info = [{'website': 'www.mdn.com', 'name':'shubham', 'company_name': 'mdn'}, {'website': 'google.com', 'name': 'ketan', 'company_name': 'google'}, {'website': 'http://microsoft.com', name:'somename', , 'company_name': 'microsoft'}, {'website': None, 'name':'somename2',, 'company_name': None}....] upto 10,000 dict
Now, I have a DataBase(PostgreSQL) table which contains the following field:
+--------------+-------------+--------------------+-------------+---------
| company_name | website | email | campaign_id | color_code | |
+--------------+-------------+--------------------+-------------+------------+--+
| google | google.com | shubham#google.com | 50 | #FFFFFF | |
| mdn | www.mdn.com | some#mdn.com | 50 | #FFFFFF | |
+--------------+-------------+--------------------+-------------+---------
up to 20,000 rows
Now what I want is to be able to update the color code field the above table from dnc_info on basis following conditions
Condition 1: Table's company name should match with dnc_info company name ignoring case sensitivity
Condition 2: Only website's domain from table should match with dnc_info website domain ignoring case senstivity
Condition 3: Table's email domain should match with dnc_info website's domain also ignoring case sensitivity.
Condition 4: Table's email should match dnc_info email also ignoring case sensitivity.
I'm able to create separate lists for every object key from dnc_info like this:
website = ['mdn.com', 'google.com', 'microsoft.com']
email = ['shubham#mdn.com', 'someone#google.com']
Please suggest an optimised model query based on the above conditions that will update the column color_code in the table.
Instead of using ORM, I had used raw_query() and it worked for me.
I have a table of data, I want to group this data and then sort the groups of rows in a custom way.
Example:
I have a table of data like this:
key | group
-------------
BC.AA | BC
AA.AA | AA
CC.DE | CC
AA.CD | AA
And a list of groups like this
group | no. of items
-------------------
BC | 1
CC | 1
AA | 2
How do I create a new table where the rows of the first table are grouped and ordered in the same way the second table is ordered. So like this:
key | group
-------------
BC.AA | BC
CC.DE | CC
AA.CD | AA
AA.AA | AA
I like to do this with excel formulas, so it updates automatically when the original table is changed. I hope to avoid using macros, but I could write a custom excel worksheet formula.
You could add a column to your first table of =MATCH(B1, GroupSheet!A:A), which will just return the corresponding row in GroupSheet that matches your group column, and sort by that.
You can do this in Excel 2010 by selecting the data you want to sort, going to the Data tab, clicking the Sort icon and then choosing Custom List... under Order. This will be fine for small sorts, but you might need something more powerful for longer lists...
I'm having a problem how to build a good workflow. I've access to InfoPath and SharePoint Designer. I'll try explain below:
I've two lists, A & B.
List A:
| Category | Product | Qty* | Date* |
List B:
| Product | Category |
The list A got a form that users fill in. The user can type in a product and leave category blank. Or chose a category and here's my problem. Then I want the workflow to collect all products with the selected category in list B and put in field "Product".
For example:
User select category "t-shirt". When the form is posted, the product category is set to "red t-shirt, blue t-shirt, green t-shirt, cool t-shirt".
Is this possible? Can this be made in any other way?
Thanks in advanced.
Use Data Connections. Query the List B by passing the category value in List A.