Conditional Formatting of Axis Label Names - axis-labels

I have a bar chart where I need to do conditional formatting for the colours of the axis label names. eg. If Axis.Labels.Names from Table_1 = Axis.Labels.Names from Table_2 then Label text colour = Green or else Red.
Table_1
|Customer | Value |
|---------|-------
|ABCD | 100 |
|EFGH | 150 |
|IJKL | 200 |
|MNOP | 250 |
|QRST | 300 |
|UVWX | 350 |
Table_2.
|Customer | Value |
|---------|-------|
|ABCD | 500 |
|QRST | 550 |
|IJKL | 750 |
If I plot Table_1. Then I want to get the colour of ABCD,QRST,IJKL text of the Axis Labels as Green, as those labels are also present in table_2. For EFGH,MNOP,UVWX I want the axis label text colour to be Red (as those labels are not in table_1). How can I do that in Spotfire?

Related

Excel Formula, Sumifs, condition is an array range

Goal: Use SUMIFS to get the sum of value if color is Red or Yellow. Outcome should be 3.
+---+--------+-------+---+-----------+
| | A | B | C | D |
+---+--------+-------+---+-----------+
| 1 | Key | Value | | Condition |
| 2 | Red | 1 | | Red |
| 3 | Yellow | 2 | | Yellow |
| 4 | Green | 3 | | |
+---+--------+-------+---+-----------+
Problem:
It works if I hardcode the condition {"Red","Yellow"}. The result is 3.
=SUM(SUMIFS(B2:B4, A2:A4, {"Red","Yellow"}))
But if I reference the condition by cell D2:D3, I get 0.
=SUM(SUMIFS(B2:B4, A2:A4, D2:D3))
Question: How do I reference the condition dynamically by cell and make it work?
Use SUMPRODUCT() instead of SUM():
=SUMPRODUCT(SUMIFS(B2:B4,A2:A4,D2:D3))
One note:
This variation allows the expansion of the lists without the need to reapply the ranges:
=SUMPRODUCT(SUMIFS(B:B,A:A,D2:INDEX(D:D,MATCH("zzz",D:D))))
Alternatively, you can use SUMIF() together:
=SUMIF(A2:A4,"Red",B2:B4)+SUMIF(A2:A4,"Yellow",B2:B4)
Or make sure you're using CTRL+SHIFT+ENTER with your current formula attempt.

dynamic excel array based on input

I am looking for a little help in making a formula based dynamic array in excel.
KPI | Tgt | number | Weight
FCR | 0% | 1 | 45%
FCR | 60% | 2 | 45%
FCR | 80% | 3 | 45%
Leads | 45% | 4 | 25%
Leads | 50% | 5 | 25%
Leads | 200% | 6 | 25%
Attrition | 8% | 7 | 10%
Attrition | 12% | 8 | 10%
Attrition | 100% | 9 | 10%
Abandon | 1% | 10 | 20%
Abandon | 5% | 11 | 20%
Abandon | 200% | 12 | 20%
So if i have a Leads score in cell E2 as 3%, then i want output in F2 as Number 4 which is <45% hence 4.
PS: I have a spreadsheet but don't know how to attach it.
Try this in F2:
=INDEX(C:C,AGGREGATE(15,6,ROW(B:B)/((B:B>=E2)*(A:A="Leads")),1))
This will only return matches for rows with "Leads" in column A. This can be made into another reference if you have or want to put that into another cell instead.
EDIT:
Based on you're comment below, this formula works as well if entered as an array (CTRL + SHIFT + ENTER):
=INDEX(C:C,MATCH(1,(A:A="Leads")*(B:B>=E2),0))
EDIT 2:
We can cover our bases for an unsorted list in column B by combining the two solution:
{=INDEX(C:C,MATCH(1,(A:A="Leads")*(B:B=AGGREGATE(15,6,B:B/((B:B>=E2)*(A:A="Leads")),1)),0))}

SQLite merge duplicates

I have a SQLite table, in which there are some Rows which differ in just one column.
I want to merge the entrys in this Column with a seperator (line break in my case).
So, this:
| id | block | description|
------------------------------
| 1 | a | foo |
| 1 | a | bar |
| 3 | b | cat |
| 4 | c | mouse |
------------------------------
Should become this:
| id | block | description|
------------------------------
| 1 | a | foo \r\n bar|
| 3 | b | cat |
| 4 | c | mouse |
------------------------------
I don't even have an Idea what to search for (instead of "merge", but I couldn't find anything suitable for my application), so any Input would be appreciated.
Jann
I think you are looking for group_concat():
select id, block, group_concat(description, ' \r\n ')
from t
group by id, block;

Resize Infragistics UltraGrid to contents

How do I resize the entire ultragrid control in code to only show its contents?
i.e: I have
-----------------------------
| | | | blank |
| | | | |
| | | | |
| ------------ |
| |
| |
|____________________________|
and I want the borders to be tight to the grid
My best bet so far was to query DefaultLayout.Bands(0).GetExtent() and use that as the width of the grid.

WPF Datagrid Rowspan on one column depend of value

(sorry for my english)
I have a problem with my datagrid.
First, my datagrid is fill from a database, depend of a value selected in a combobox. When the SelectedValue of my combobox change the datagrid ItemsSource is refresh with good value.
For now my datagrid look like that
|---|---|---|
| A | + | 1 |
|---|---|---|
| A | - | 1 |
|---|---|---|
| B | + | 2 |
|---|---|---|
| C | - | 1 |
|---|---|---|
I would like to span row of column with number if letter are equal. Because the value of number is linked to the letter value.
To make the datagris look like
|---|---|---|
| A | + | |
|---|---| 1 |
| A | - | |
|---|---|---|
| B | + | 2 |
|---|---|---|
| C | - | 1 |
|---|---|---|

Resources