Grafana classic pallet in color schema is not assigning colors - time-series

I am having trouble understanding how can I enable color pallet for my timeseries graph.
My table view of data coming in Time series graph is like this
name
count
timestamp
abc
2
2023-02-13 06:14:00
bcd
5
2023-02-13 06:20:00
xyz
3
2023-02-13 06:31:00
xyz
7
2023-02-13 06:45:00
Now according to me if I select Classic pallet for color scheme it should assign individual color for each unique column name entry. But right now it is assigning Single base color to all the entries.
Am I doing something wrong or is there some setup which I am not doing correctly.

Related

In Tableau how do I use RANK to calculate an "OTHER" field?

I'm new to Tableau so this may be an easy question about computations using RANK. I can't find any tableau HELP or other stack-overflow answer to this. Maybe this is a GROUP question. Maybe it's about OTHER.
I have a data set of 160 countries ( rows ) with a field for jetfuel consumption for each country.
I just want to make a bar chart like the attached image showing the 20 highest fuel-consumption countries by name ranked by jetfuel_consumption ( I can do that much) AND an 21st row computed country name titled "Rest of world" summing the remaining 140 countries together as if it were just another country like the bottom of this model .
I have a working valid computed field labelled "myrank" = RANK(AVG([Jetfuel Consumption]),'desc')
My thought was to simply calculate a new text field that would equal the country name for rank < 21 and then be the string "Rest of World" otherwise.
Such as:
IF ( [therank] < 11 ) [Country] ELSE "Rest of World" END
But that is not valid for an unspecified reason. I know I'm confused already about how to just specify the value of a field without something like SUM or AVG or AGG wrapping it, but this is a larger question.
What's the right way to make this view?
I've created simple dataset:
And I want to group TOP 3 countries by Consumption.
To do it I should create a set (click on Country in Dimension) and select TOP 3 By SUM(Cosumption):
Then create a calculated field to show Countries IN Set and "Others".
IF [Country Set] is a boolean expression "The country IN a set".
Drag and Drop corresponding fields and configure sort, for example:
Sets are convenient to dynamically change, expand and customize any visualization. More detailed: https://help.tableau.com/current/pro/desktop/en-us/sortgroup_sets_topn.htm

How can I read the content of a cell in Google Sheets and use it to set values in other cells?

In Google Sheets, I am working on a calculations form with several columns so multiple users can use it concurrently.
The layout is 1 column for the number data and the next is for setting varying weights to apply for each entry. That's all working.
What I'm looking to do is setup a pull-down menu with the various data columns listed where a user can select the column they were working in and hit the clear button to clear their entries.
I also want to setup a pull-down menu with the various weight columns listed where a user can select the column they customized weighting in and reset it.
I have created scripts to manually do this but I want to be able to substitute the selected column rather than have 26 different scripts and buttons.
Here are the manual scripts that address the data column Z and the weight column AA:
function resetFormCDataColumn() {
SpreadsheetApp.getActiveSheet().getRange('z1:z4').setValue('');
SpreadsheetApp.getActiveSheet().getRange('z8:z9').setValue('');
SpreadsheetApp.getActiveSheet().getRange('z12:z13').setValue('');
SpreadsheetApp.getActiveSheet().getRange('z16:z17').setValue('');
SpreadsheetApp.getActiveSheet().getRange('z20:z21').setValue('');
SpreadsheetApp.getActiveSheet().getRange('z24:z25').setValue('');
SpreadsheetApp.getActiveSheet().getRange('z29:z30').setValue('');
SpreadsheetApp.getActiveSheet().getRange('z36:z37').setValue('');
SpreadsheetApp.getActiveSheet().getRange('z40:z41').setValue('');
SpreadsheetApp.getActiveSheet().getRange('z45:z48').setValue('');
}
function resetFormCWeights() {
SpreadsheetApp.getActiveSheet().getRange('AA3').setValue('1');
SpreadsheetApp.getActiveSheet().getRange('AA6').setValue('1');
SpreadsheetApp.getActiveSheet().getRange('AA7').setValue('1');
SpreadsheetApp.getActiveSheet().getRange('AA8').setValue('1');
SpreadsheetApp.getActiveSheet().getRange('AA11').setValue('1');
SpreadsheetApp.getActiveSheet().getRange('AA12').setValue('1');
SpreadsheetApp.getActiveSheet().getRange('AA15').setValue('1');
SpreadsheetApp.getActiveSheet().getRange('AA16').setValue('1');
SpreadsheetApp.getActiveSheet().getRange('AA19').setValue('1');
SpreadsheetApp.getActiveSheet().getRange('AA20').setValue('1');
SpreadsheetApp.getActiveSheet().getRange('AA23').setValue('1');
SpreadsheetApp.getActiveSheet().getRange('AA24').setValue('1');
SpreadsheetApp.getActiveSheet().getRange('AA27').setValue('1');
SpreadsheetApp.getActiveSheet().getRange('AA29').setValue('1');
SpreadsheetApp.getActiveSheet().getRange('AA32').setValue('1');
SpreadsheetApp.getActiveSheet().getRange('AA33').setValue('1');
SpreadsheetApp.getActiveSheet().getRange('AA35').setValue('1');
SpreadsheetApp.getActiveSheet().getRange('AA36').setValue('1');
SpreadsheetApp.getActiveSheet().getRange('AA39').setValue('1');
SpreadsheetApp.getActiveSheet().getRange('AA40').setValue('1');
SpreadsheetApp.getActiveSheet().getRange('AA43').setValue('1');
}
I want to replace the z ad aa entries based on the select pull-down option when they click the button (see image for example).
How do I do this?
Example Image

How to import information from sheets in another Document based on two values? Google Sheets

I have 2 documents:
Document 1 contains a list with so called Set-names, displayed as "Set". And within each "Set" there is name that can be found that corresponds to the number within that set.
Document 2 contains all the Set-names with each their own numbers and Name. Each Set-name has it's own Sheet, and there is a lot of them.
I want to fill in just the Set-name "Set" and Set-number "Set#", to automatically display the name corresponding to these two values. The question is however, how do I do that?
Document 1: Collection
Shared document link: Click here (File > Make copy)
Document 2: All Set-names
Shared document link: Click here (File > Make copy)
In this example above I would like to output "Dark Raichu" within Document 1 at Q74:T74 and at Q75:T75. Is this even possible to make? INDIRECT might help as well so I don't have to manually edit each Set-name. Any idea/suggestion/solution is much appreciated!
EDIT
(following OP's explanations)
First of all I have to say that you should AVOID making such radical changes to the original question, since it completely throws readers off balance.
Having said that there is a completely different approach that should be followed.
In your Document 2: All Set-names
Step 1
Go to your Wizards Black Star Promos tab.
Using a formula like =ArrayFormula(A4:A59&"/555")
change the Set # from 1,2,3...59 to 1/555,2/555,3/555...59/555
(555 can be any unique number that does NOT conflict with the other sets)
Step 2
Create a new tab. Name this tab AllSets
Step 3
Use this formula in cell A2
={FILTER('Base Set'!A5:C,'Base Set'!A5:A<>"");
FILTER(Fossil!A5:C,Fossil!A5:A<>"");
FILTER('Base Set 2'!A5:C,'Base Set 2'!A5:A<>"");
FILTER('Wizards Black Star Promos'!A5:C,'Wizards Black Star Promos'!A5:A<>"");
FILTER(Jungle!A5:C,Jungle!A5:A<>"")}
Using this pattern complete the formula for the rest of your tabs. You will end up with a 3 columns list of all your sets in one place.
In your Document 1: Collection
Step 4
Go to your Collection tab.
In cell Q2 (where column Q is exactly before your Name column R) use the following formula.
(As before, complete the formula for the rest of your tabs)
=INDEX(IFERROR(N2:N&(SWITCH(H2:H,
"Base Set","/96",
"Jungle","/64",
"Wizards Black Star Promos","/555",
"Fossil","/62"))))
This way you will bring the complete Set # back.
This will be our helper column which can be hidden and will be only used in the next formula.
Step 5
In the same Collection tab and in cell R2 place this formula
=ArrayFormula(IFERROR(
VLOOKUP(Q2:Q,IMPORTRANGE("1n8iWAl7ZQhsue6Opefvh_9yDwMk06PvqUdQoVuEJw00","AllSets!A2:C"),{2,3},0)))
The above final formula will give you everything.
The Card name, the Type as well as the Link and the Image of the card.
If you do not want the Type just change this part of the formula {2,3} to just 2.
Step 6
Enjoy :)
Additional functions used:
FILTER
INDEX
SWITCH
Original answer
(For the question as originally posted )
You can use a combination formula like
=ArrayFormula(IFERROR(
VLOOKUP(V2:V,{REGEXEXTRACT(Sheet1!R2:R,"\d+")*1,Sheet1!S2:S},2,0)))
(do adjust ranges and locale syntax to meet your needs)
Functions used:
ArrayFormula
IFERROR
VLOOKUP
REGEXEXTRACT
You can easily import a range from one Spreadsheet to another using IMPORTRANGE. IN your case described as you wanted to import the range A5:A (i.e all cells in column A minus the first 5 cells in the column) of the sheet Team Rocket of the Spreadsheet Document 2 into Document 1 cell Q73 you would need to use this function in cell Q73:
=IMPORTRANGE("YOUR DOCUMENT 2 SPREADSHEET URL","Team Rocket!A5:A")
Note that when you first use this function it might ask you to grant access between these Spreadsheeets to let one get the data from the other

How to create a list in a new column when data in another column is > ..% with the conditional formatting included?

I have a Google Sheets project with a table in there. The cells percentages change every now and then (external API kind of add-on) and I would like the column to be checked if a certain percentage is met. If it is, the corresponding name in column A should be copied in column D let's say. So example:
A formula something like: if a value of column C > 5%, copy the corresponding name in column A to a new column D. But the main thing is that it shifts everything up so there are no gaps. If I refresh the data, it should create the list again with no gaps and remove the former data that doesn't meet the requirements anymore. Please help!
P.S. I would also like the background color of column C (conditional) to copy to the new column
use QUERY
=QUERY(A2:A, "where A > 0.05")
and then all you need to do is select Greater then in CF rules:

Using arrayformula to autofill formulas for new entries- comparing cells in the same column

Relative beginner to using formulas in excel/google sheets, and I'm having some trouble figuring out how I can use an array formula to compare cells in different rows but the same column in google sheets (in my case, how I can do =IF(A3=A2,dothis,elsedothis) as an array formula. I'd also be interested if anyone has a different solution other than array formula to autofill formulas in.
The specifics:
I have a list of participants who've done an experiment, and some of them have done it multiple times. With a long list of participants and multiple entries for some participants, it's difficult to see where one participant's info ends and the next begins. So what I want is to alternate the rows in gray and white shading based off of the participant's number (ie. all of 001's entries in gray, all of 002's entries in white, 003's in gray, and so on). To do this, I put in a column on the right using a formula that checks if the participant number in the row above it is the same and, if not, it adds one (I'd like to use this to get a participant count later on). This is what the dataset looks like, and I've included the formula on the right.
A B ... ... X
001 9/1/16 ... ... 1 (1)
001 10/1/16 ... ... 1 (=IF(A3=A2,X2,X2+1))
001 11/1/16 ... ... 1 (=IF(A4=A3,X3,X3+1))
002 9/2/16 ... ... 2 (=IF(A5=A4,X4,X4+1))
002 10/2/16 ... ... 2 (=IF(A6=A5,X5,X5+1))
003 10/5/16 ... ... 3 (=IF(A7=A6,X6,X6+1))
...
All this is working fine and dandy, but the problem is, when I enter a new row, it doesn't automatically fill in the formula, and so the shading doesn't adjust. I suppose I could redrag down the formula every time I enter in new participant info, but that's tedious and I'm not the only one using it, so it's going to get messed up pretty quickly. From what I looked up, arrayformula is what I should be using. But you have to refer to the column as a whole if you use arrayformula. Anyone have any ideas?
Assuming you got the conditional formatting covered, I believe the formula(s) you use can be turned into one single array formula so that the output auto-expands when new rows are added. Example:
={1; ArrayFormula(IF(LEN(A3:A), offset(A2,0,0,ROWS(A3:A),1) + IF(A3:A = offset(A2,0,0,ROWS(A3:A),1), 0, 1),))}
See if that would work for you?
NOTE: the custom formula in conditional formatting used in the spreadsheet is
=AND($X1<>"", ISODD($X1))
One way to achieve the desired result:
To alternate the rows in gray and white shading based on the participant's number do the following:
Under the Format Menu choose conditional formatting
Enteries for the Conditional format rules dialog
In apply to range select the range e.g. A2:A16 (it may include blank cells)
For Format cell if choose Custom formula is
Type =isodd(A2:A16) in the text box below
For Formatting style choose Custom
Choose gray color from the fill button
Finally hit Done
To get a participant count you can use the formula =countunique(A2:A16)
You can do this alltogether without an additional helper column at all, just using conditional formatting:
The custom function to add into the conditional formatting option is this:
=isodd($A:$A)=TRUE
At the end if you still want your participant count, you can use this:
=COUNTA(UNIQUE(A:A))

Resources