I have a small issue on QlikView, i m trying to apply different colors on concatenated values, when in separated columns, color works fine no big deal, but concatenated none is applied:
code on value definition: =concat(Milestones,' / ')
code on Text color under value definition:
=if(Status='Finished',Green(),if(Status='In Progress',Blue(), if(Status='Overdue',Red())))
i ve tried something like =concat(
Milestones,if(Status='Finished',Green(),if(Status='In Progress',Blue(), if(Status='Overdue',Red()))),' / ') in the value definition, but it gets me an unpleasant error.
Hope i ve expressed my issue well, Thank u in advance for your help
The problem is that when you concat the fields in the expression you now have many lines of data on one line. When you have them in separate columns they will appear on separate lines.Have a look at the difference between these two tables
QlikView no longer knows which of the statuses is the correct one for each id since there are multiple possibilities. So it can't evaluate an answer which means it can't give you a colour.
The way to fix this is to give it something to look for. I would do it like this. (My test data is slightly different to yours but the important part is the index()>0 which is a function to find a given piece of text in a larger string and then return the numeric position, 0 means not found, anything bigger than 0 is found.
if(index(concat(Status,'/'),'Resolved')>0,lightGreen(),
if(index(concat(Status,'/'),'New')>0,lightRed()))
That should give you something like this.
The order of teh nested if will be important as the first true will be the assigned colour, so if things can be In Progress and Overdue you should test for Overdue first.
Related
Disclaimer: I am completely self-taught in google sheets
I have a sheet with columns for Date, Place, Title, etc. I am attempting to count how many rows have all their cells filled out, but only want to add up the rows within a certain time period (i.e. based on the "date" cells, which are column A.)
=SUM(ARRAYFORMULA(AND(
ISBETWEEN(A9:A,DATE(2022,1,21),DATE(2022,4,1)),
ISTEXT(B9:B)=ISTEXT(C9:C)=ISTEXT(D9:D)=TRUE)))
Currently I have this formula, which relies on an "AND" function to check that both the "ISBETWEEN" and "ISTEXT" criteria are met. However, I think this is keeping "ARRAYFORMULA" from working (I originally used "SUMPRODUCT", but that didn't work either.) If that isn't the problem, the fact that the different references aren't somehow logically connected makes wonder if this would method would even work to begin with...
So, what functions could I use to accomplish my goal?
I would prefer to contain all of this in one formula, but at this point I'd be fine utilizing a separate hidden sheet if what I'm doing isn't possible in just one cell.
(I've done my best to try and find if this has already been asked, but honestly I'm not sure how to properly phrase this, so sorry if this is a duplicate.)
try:
=COUNTA(IFNA(FILTER(B9:B; B9:B<>""; C9:C<>""; D9:D<>"",
A9:A>="2022-1-21*1"; A9:A<="2022-4-1"*1))
or use:
=SUMPRODUCT(B9:B100<>""; C9:C100<>""; D9:D100<>"";
A9:A100>="2022-1-21"*1; A9:A100<="2022-4-1"*1)
So I'm having difficulties understanding fully how arrays works and when they are used by excel and specifically what happens in the background.
From reading the past few hours I understand that one of the reasons my Index Match doesn't work without array is simply because its a multicriteria Match that I use as below:
{=INDEX(D30:E36,MATCH(F33&G33,B30:B36&C30:C36),2)}
From what I understand the reason is that Match returns a {x,y} result which classifies it as an array formula. But considering the point is to get a row number, if the row I'm looking for is 5 then Match will return a {5,5} for row number for Index. And then Index interprets this as just 5? or what exactly happens in the background here?
Then I found an article which showed how to circumvent the array formula and not need ctrl+shift+enter as shown below. How does the below change things and what happens in the background?
=INDEX(D30:E36,MATCH(F33&G33,INDEX(B30:B36&C30:C36)),2)
The below is a an array SUM/COUNTIF formula which counts unique cells only which does not work without array brackets. Why is that and how does it work? It involves maths so I'm not sure.
{=SUM(1/(COUNTIF(A1:A5,A1:A5)))}
Thank you!
I've got a bigger table with one column that I want to focus on, containing designation and a number. I want to simply sum the numbers that meet the criteria based on a designation.
For the simplification, I made an exercising sheet (on the pic) where I split second column into two - one string and one numeric. Since my file is quite large with many columns that would need this it would be inconvenient.
In the left column it's easy to solve the problem, it could be even easier with simple SUMIF function, but an array SUM(IF... function is, at least I think, only viable option here.
So I solved the first table with array function, but what confuses me is how to modulate the TRUE statement. Simple replacement of C:C
with
VALUE(MID(F:F;4;4))
which would format my cells to get the numbers from string does not work that way - returns zero in E12 field. F12 is just application of string to number for last cell, F10.
THIS formula does not work, even adapting to different versions of the tool.
I could use VB but if possible anyhow I would like to avoid it since parts will be shared on mobile phones.
Any ideas? Thanks a lot!
Left table was split, right original format
The array formula which you used can be replaced by the SumIf formula like below...
=SUMIF(B:B,"B",C:C)
Also without the helper column, you can use the Sumproduct formula to achieve the desired output.
But don't refer the whole column in the formula like in the above SumIf formula.
Try this..
=SUMPRODUCT((B1:B10="B")*MID(F1:F10,FIND(",",F1:F10)+1,255)*1)
Change the ranges as per your requirement but remember to make them equal in size.
As shown in the attached image, I need to convert A2:D10 to the format of A12:E17. The 4 tables from F1 to AB12 are my experiments using if, match, and index. Same formula gets different results and it seems to be dependent on the row position of the tables. In My previous question, I was trying to pinpoint the problem to the if function.
What am I doing wrong here?
Thanks,
Lu
enter image description here
Again, as I said in your last question: The formula has not been array entered. Array formulas need to be confirmed with Ctrl-Shift-Enter.
Without that, the first array in the IF statement does not get resolved and the Match does not return the correct result.
Make use of the Evaluate Formula tool and step through the formula.
The merged cells don't help with the cell referencing. Unmerge the cells and fill in all the labels in row 1, then use this slightly amended formula and confirm it with Ctrl-Shift-Enter. Then copy across and down.
I hope that I get the English names of the functions right:
In D14 and following cells:
=INDEX($C$1:$C$5;MATCH(1;MMULT(($B$3:$B$10=$A14)*($A$3:$A$10=B$13);1);0))
The MATCH function tells which value (by number counted from the top) matches both conditions. The INDEX function returns this value from C1:C5.
I think I understand from the behavior how these two plot commands differ, but I don't really understand why they differ. That is, I didn't expect there to be a difference. The two cases are:
plot for [i=0:3] 'ctg-y2.dat' index i using 2 title columnheader(2) with lines
and
plot 'ctg-y2.dat' index 0:3 using 2 title columnheader(2) with lines
(the example datafile is http://gnuplot.cvs.sourceforge.net/viewvc/gnuplot/gnuplot/demo/ctg-y2.dat)
The first one does what I would expect: for each of four datasets in the file, read a column header from the first line of the dataset, and plot the remaining data. The second one does something rather different: it does not read a column header for any dataset but the first, and it seems to plot all the data as if it were part of one dataset. The result is a mess, since the implicit x values don't match up correctly.
The description of index in the manual doesn't talk about this behavior of using a range with index, as near as I can tell. Is it documented somewhere? Is this a bug? Am I doing something stupid?
I have never used the index before, but if I understand it correctly, it seems to merge all indexed data sets to a single set. This is why the lines all appear in the red color. However, if plotted against the column index and not a given index (e.g. using 2 vs using 1:2) it seems to fall back to index 1. This is due to the fact that the first line cannot be interpreted (since it is a title).
The issue with the column headers seems to be working ok, since gnuplot expects to have just a single dataset, which is combined with the keyword index, and therefor does not expect to have multiple column headers.
Since you already solved your problem with the iterations there is no need for further suggestions. I think this is exactly how you should plot your data.