How can I calculate a group wise total in a silverlight datagrid? - silverlight-3.0

I want group wise sub Total and at the end grand total
please provide some sample code for the same
For Example
Group ItemID Price qty total
1 1 5 2 10
2 3 3 9
------
19
2
2 3 3 9
------
9
------

http://forums.silverlight.net/forums/p/119135/330661.aspx
Check this link I have posted the solution in the last.. hope it will help you.

I am trying to achieve the same functionality.
So far i have managed to found the following examples (works for silverlight 4)
Summary row in DataGrid
Summary rows in Datagrid with multiple groups

Related

Find closest date in range with multiple critera

I have tried to simplify my problem to make it easy to explain what I need.
I have 2 tables like this example:
TABLE 1
ItemNo
Total Received
PlanRcvDate
10560300
2
3/05/2022
10560300
4
28/04/2022
10560300
6
27/04/2022
30238543
1
1/05/2022
30238543
3
29/04/2022
30238543
5
28/04/2022
TABLE 2
ItemNo
CutOffDate
Received before CutOffDate
10560300
2/05/2022
10 (4 + 6)
30238543
29/04/2022
8 (3 + 5)
What I would like to calculate is the column *Received before CutoffDate.
This columns gives me the sum of everything that has been received on dates smaller or equal to the CutOffDate for that particular ItemNo.
If I isolate my tables to 1 ItemNo, I can calculate this but I have not found a way to do this in a general way because my TABLE 1 has hundreds of ItemNo.
Any help would be appreciated!
Thanks in advance
try:
=SUMIFS(B:B; A:A; E2; C:C; "<="&F2)

How to fill only first row after filtering

I am trying to make an overview of different sub-tasks per project, think of three columns, Project, Task-ID, Working hours. After filtering for working hours, I would want to show all task-IDs that meet the requirement, but only show the Project in the first rows of respective tasks. Is there a way to solve this problem?
I've tried conditional formatting (changing the text color to meet the background if previous Project text cell is similar to current cell), but this does not change when filtering.
All data:
Project Sub-Task Working hour
1 1-Collect 4
1-Upload 3
1-Read 6
2 2-Collect 3
2-Upload 3
2-Extract 5
3 3-Collect 6
3-Upload 7
3-Read 7
Goal (when filtered for Working hour>5):
Project Sub-Task Working hour
1 1-Read 6
2 2-Extract 5
3 3-Collect 6
3-Upload 7
3-Read 7
try:
=FILTER(A:C, C:C>5, A:A<>"")

How to reorder some rows in specfic orders in pandas python

I have a dataset like this:
A B
0 2 3
1 2 5
2 1 7
3 1 8
And I want to re-order it like this in a fast and efficient way:
A B
0 1 8
1 1 7
2 2 5
3 2 3
How can I achieve this efficiently?
According that your DataFrame is df, just use
df.sort_values(by='B')
You could try the implementation given on this page.using the sort_values function.
Assuming your data is stored in a data frame you can use `df.sort_values(by="B")
For a better understanding go to the following link
https://pandas.pydata.org/pandas-docs/stable/generated/pandas.DataFrame.sort_values.html
Please check it out!

Formula to condtionally sum an array of values from one sheet to give totals on another

I have two sheets, connected by ID, which contain details of events and charges.
Sheet1 (breakdown of charges):
[Oh, just discovered I'm not allowed to include screen shots. I apparently need 10 reputation points. Not sure how to show you my spreadsheet now...]
ID DBF PCC Extras
1 200
1 100
3 200
4 350
4 250
4 75
4 25
7 100
[Sorry this will probably look horrible, I can't figure out how to include a spreadseet snippet without using an image. I had 3 imaage all prepared ready.]
Sheet2 (indentification and summary information):
ID Type Name
3 MON Edwards
7 REC Smith
4 WDG Jones
1 FNL West
8 WDG Richards
9 WDG Morrison
11 INT Gray
I am trying to add three additional columns to sheet 2 so that it shows a summary of the charges for each event. I would the charges information to update automatically in sheet2 as detail is added to sheet 1.
The resulting sheet2 will look like this:
ID Type Name DBF PCC Extras
3 MON Edwards 200
7 REC Smith 100
4 WDG Jones 350 250 100
1 FNL West 100 200
8 WDG Richards
9 WDG Morrison
11 INT Gray
As data for ID 8, 9 and 11 is added to sheet1, the summations should automatically appear in sheet2.
I have been trying to create an array formula to put in sheet2:B2, something like this:
=QUERY('Log Items'!A:F, "select sum(C), sum(D), sum(E), sum(F) where A="&A:A, 0)
This produces the correct result for ID 1 but it stops there and I'm not sure why. Also, despite my 0 as the third parameter, the header row is output.
I tried encapsulating the above in an ARRAYFORMULA but get a parse error.
I have also tried various combinations of ARRAYFORMULA, SUM and IF but not got anything that works. For example:
=ARRAYFORMULA(SUM(IF('Log Items'!A:A=A:A,'Log Items'!C:E,0)))
This gives #N/A "argument out of range", which I don't understand.
Although I've been working with Excel for a while, I'm really new to Google's Array formulas but have mananged to use them successfully in other parts of my spreadsheet and found them really powerful.
If anyone could help me with this, I would be very grateful.
In Sheet2!D2:
=ARRAYFORMULA(IF(A2:A,MMULT(N(A2:A=TRANSPOSE('Log Items'!A2:A)),N('Log Items'!B2:D)),))
Note: the N() functions have become necessary with different coercion behaviour in the new version of Sheets. They can be omitted in the classic version.
MMULT usage

Count matches between two columns on Google Docs

I have two columns that I want to test if any of their values matches and count how much of them. For example:
1 2
2 5
3 1
4 7
Should return two, since 1 and 2 are in both columns.
I've found that in excel I could do =SUMPRODUCT(A1:A4=B1:B4), but I can't find the same in Google Spreadsheet. I tried =ARRAYFORMULA(SUMPRODUCT(A1:A4=B1:B4)), but it didn't work.
Thanks for the help!
I think its strange to answer your own question, but since I found the solution..
I archieved it doing =ARRAYFORMULA(SUM(COUNTIF(A1:A4=B1:B4)))

Resources