Hello Forum,
I want to Display in a UltraWinGrid at the Bottom a Summarie Field
where I simply want to put out Calculated data from a specific Column
1) Total RowCount in Column [Differences]
2) The number and % how often a 0 is found in Column [Differences]
3 The number and % how often a 1 is found in Column [Differences]
The Data in the column [Diffrences] looks like this
ID Diffrences
1 0
2 0
3 0
4 0
5 1
6 1
This Codeline was Created by the Formular editor:
Infragistics.Win.UltraWinGrid.SummarySettings summarySettings1 = new Infragistics.Win.UltraWinGrid.SummarySettings("totalDif", Infragistics.Win.UltraWinGrid.SummaryType.Formula, "count([Differences])", null, -1, false, null, -1, Infragistics.Win.UltraWinGrid.SummaryPosition.Left, null, -1, false);
and it Simply Calculates the Total number of Rows.
Now i want something like in excel: = FREQUENCY(A1:A13; 0), but i cant find the correct formular
What is the simplest way to do that?
TIA
Michael!
If your differences column is always 0 or 1 then count(differences) - Sum(differences) = # of 0's and Sum(Differences) = # of 1's.
Nick
Thanks for the Answer!
Hmm well Differences Column Could be:
0,1,2,3,4,5,6 for difference aktually i want to count the number of 0 the number of 1's the number of 2's and so on.
So Sum wont work, if i see it right...
Never quite that easy is it. I would probably recommend creating custom summaries. I hope there is some finite number of possibilities.
Don't know if your requirements would allow you to GroupBy differences. If you need the detail sorted by some other column probably not.
Hello,
could you provide a codesnippet, or a link to
archiv such 'custom summaries'
Regards
Michael
It's called UserDefinedLibrary and it's under the WinCalcManager samples.
\Samples\WinCalcManager\CS\UserDefinedLibrary
I will try your Suggestion with the UltraCalcFunction, do you maybe know the name of the c# project in the SDK where this is shown?
Another option would be to create your own UltraCalcFunction. There's a sample of this included in the NetAdvantage SDK, also. You can create your own Frequency function and add it to the library of CalcManager functions and then use it in your formulas.
See the example in the help documentation for ICustomSummaryCalculator Interface. Sorry would give you the link but it doesn't seem to resolve to a low level link anymore.