Is there a way of making 2 slices work as one?
So, the upper slicer is for Client Name, and the other is for Contract Type... I wanted both of them, to work them as one... That is; if a button is selected in the upper one; it should clear all the results from the below one... and viceversa.
(I am consuming from a SSAS .bim cube file.)
Related
Working with basketball data, I'm trying to get the time on court for the players (there are some columns that have information about a player or players).
I tried to obtain the value with a calculated column, named "TimeOnCourt". The code works for most cases but there is a case that, due to a mistake in the data entry team, there are different values of the players columns for the same "TimeOnCourt" so, when I try to visualize the information, the data entry mistake comes out.
I guess I could use the column "Index" to add a piece of code to choose the MIN value for the "TimeOnCourt" column but, after trying some options, I don't know where to put it or if I have to change the full code.
I also tried with Test_Flags but not working for all cases (but could fix 2 of the 4 cases).
Add you the link with the pbix file and the Test_Flag measures I tried: Link to pbix file v3
And the image with the mistake marked. The expected time in the right visualization should be 0:40:00 instead of 0:43:03 (it's due to the duplicate in Full Quarter = 2Q and Time_Def = 0:04:00. This could happen again although I talked with them so the solution should be general, not filtering this specific case.
Problem
So I have searched through several different questions related to this. None of them seem to be asking exactly what I'm looking for and none of the solutions I've found have worked for me thus far.
I have several columns of data (Player names) where each column's values are generated from a formula in the 2nd row of that column. The 1st row is a header (Game name). This whole range is the collection of which players are willing to play which games. These are columns D-J(ish, the list is dynamically generated with another formula, based on form responses)
I have another range of data where the 1st column is the Player and the 2nd is the player's PREFERRED game. This data is also generated with a formula based on form responses. These are columns A-B.
Here's what I'm trying to do
Using conditional formatting in columns D-J, I want to highlight the player's name if this game (in row 1 of this column) is their preferred game (range A2:B).
I've tried several different variations of VLOOKUPS, MATCHES, and FILTERS in the conditional formatting, but so far nothing has worked. The problem I run into every time is that I can't figure out how to reference the cell that the formatting is applying to, but still have it reference each individual cell over the whole range.
I know I could do this if I applied an individual conditional formatting to each individual cell. However that is a very time consuming and inelegant solution to this issue considering I'm expecting my data range to be much larger in the future. I need a conditional formatting formula that will work across the whole range or , at the very least, for an entire column.
This is a mock of what I'm trying to accomplish:
This is a link to a mock of my sheet so that you can clearly see the data layout and specific formulas I'm using:
https://docs.google.com/spreadsheets/d/1wy1T6dWJwNC_EfdCAbkuxtkJH7y4Cg3x4IyEk6R567M/edit?usp=sharing
use:
=REGEXMATCH(D3, TEXTJOIN("|", 1, FILTER($A$3:$A, $B$3:$B=D$2)))
I have a Problem where I could not find an easy solution and I am looking for some ideas or tipps.
I am working with SAS on a project which result should be a map of europe, where the countries get colored after a certain algorithm. I use the maps.europe data and the %annomac and %maplabel macros to label the countries.
This works pretty fine, except for Portugal and Spain - because theese countries have island far away from the coastside, the calculated centroid from %maplabel of the country is not in the center of the country:
Unfortunately I just can cut portugal completely out of the map but not the Islands
I have tried already this method:
Try to cut the parts of the map via gproject which contains the islands - this delievered unexplaniable results to me (just showing some parts of europe, even if I set the parameters extremly wide)
and now I am a bit stuck.
I already thought about this ideas:
Comnbining the map.europe with the map.spain and and map.portugal where I delete the islands before, but I am not sure how to do that that the labeling and all still works for theese combined data.
Is it possible to set the label points for portugal and spain manually and overwrite the data from the %maplabel macro?
Or is there an even easier solution?
Thanks for your help and best regards
stephan
I'm not familiar with those macros, but given how GMAP works, I would indeed override the annotate dataset. You may want to read up on how annotate datasets work, but in general:
The GMAP statement will have an option, annotate= and some dataset. Find that dataset, let's say it's called ANNODS.
Then look at that dataset. Identify a row that has function=text and label=PORTUGAL. That is the row you need to modify the x/y coordinates of in order to move the label around (x1 and y1). You might need to play around with this some to get the right coordinates.
Then run the PROC GMAP, and you should have a newly moved-over Portugal.
Using Google Spreadsheets. Here's an attempt to replicate my table needs:
2012-08-30 food $15 expensive dinner
2012-08-30 food $10 pizza!
2012-08-30 other $30 that damn painting
2012-09-02 home $40 can't remember
2012-09-02 other $5 toilet paper
2012-09-02 home $2 buying new flowers
I can already do 2 things with it, but it is so far from optimal it becomes negligible.
First, Using SUMIF:
food $25 <- SUMIF(B:B;"food";C:C)
other $35
home $42
Then, combining it with ARRAYFORMULA:
food home other
2012-08-30 $25 $0 $30 <- ARRAYFORMULA(SUMIF(A:A&B:B;2012-08-30&"food";C:C))
2012-09-02 $0 $42 $5
See where this can become too big? Well...
I want to do 2 graphic charts out of this. Of course, the main one is the second:
A pie, from the first example. On using the SUMIF, I need to explicitly, write "food" there (or reference, whatever). Could that be done automagically filling every tag found?
While I can live without this, it may be the answer to the second, main question;
A plot or timeline, from the arrayformula. It should trace each tag in a plot along the time.
Is it even possible to be done? If not, any suggestions? I'm keen to start scripting if needed (and worth it). Or move away from google. Or from spreadsheets all together (lastly). Python maybe? Ruby?
Or maybe I'll just leave it as it is, if it's tooooo much trouble.
Using QUERY, you can generate the first table (with headers) using:
=QUERY(B:C;"select B, sum(C) where B != '' group by B label B 'Category', sum(C) 'Total'";0)
and this should be fairly easily plotted as a pie chart. You can select a range for the chart that is much longer than the current table to accommodate growing data, and the pie chart will conveniently ignore blank rows.
The second table can be generated using:
=QUERY(A:C;"select A, sum(C) where A is not null group by A pivot B";0)
and you can experiment with various chart types to achieve the desired visualisation.
edit
To provide a table that populates with zeros instead of blanks as per your comment; assuming the upper left (blank) cell of the table is I1, then in I2:
=SORT(UNIQUE(A:A))
and in J1:
=TRANSPOSE(SORT(UNIQUE(B:B)))
and then in J2:
=ArrayFormula(IF(I2:I*LEN(J1:1);MMULT(I2:I=TRANSPOSE(A:A);(J1:1=B:B)*C:C);IFERROR(1/0)))
Note this will populate CONTINUE functions to the far bottom and far right of the spreadsheet, over-writing everything in their path. So probably best to have a sheet dedicated to this table.
In general, Spreadsheets are not Databases, and this is a task for which you are fast approaching needing a database. However, as luck would have it (depending on how you look at it, anyhow), Google Spreadsheets actually do have some database-like access APIs, so you can probably do what you want:
http://googleajaxsearchapi.blogspot.com/2008/03/introducing-latest-ajax-api-google.html
https://developers.google.com/chart/interactive/docs/querylanguage
http://blog.ouseful.info/2009/05/18/using-google-spreadsheets-as-a-databace-with-the-google-visualisation-api-query-language/
In OpenOffice.org Calc, I would like to apply a formula to a column that references a cell from the same row but in a different column. I.e., =C1*48 in cell D1, but I want all cells in column D to do this without having to copy the formula to each one manually. Or another way of saying it, for each cell in C that has a number, I want to fill in the corresponding row-cell in D with a formula value based on that number. So far, all I can see from the documentation is that I'd have to copy/adjust the formula for every new row in the spreadsheet. And since I have 4 such columns that need calculation, this will get to be tiresome. I have little experience with spreadsheets at all, so I'm hoping that my problem is actually very simple, and that I just am looking at the wrong parts of the documentation.
I don't have OpenOffice in front of me, but it tries really hard to be Excel like in many ways, so usually assumptions about Calc based on Excel are fairly close to reality.
In Excel, a formula in cell D1, that points to a cell in C1, is treated as a relative reference - that is, one column back from where I am now. So when that formula is filled into other cells (either by Fill Down, or dragging the little handle in the corner of the cell outline, or by copy-pasting the formula into a range of selected cells) the new formulas are similarly treated, by default, as referring to the cell that is one column back from them, in the same row.
To force a formula to use an absolute reference, one specifies the cell address with a dollar sign - $C$1 will always point to (use) the contents of cell C1, regardless of where the formula ends up. ($C1 and C$1 are alternates that allow one parameter of the address to change in the usual relative sense while fixing the other half in place... this probably isn't important to you yet).
In other words, I'd expect that you can type the formulas in the first row of your OpenOffice Calc sheet and copy them down to the rest of the row, and things will just work.
If you want to extend your range down you can do this by calculating the first 2 cells with your formula and then highlighting them. You now grab the little square on the bottom right of the highlighted area and drag that down, across or both.
If you have a specific cell (e.g. D2) which you wish to have remain in all the cells you extend your range to, then in your 2 initial cell calculations use the following:
Extending Down
=G2*D$2
=G3*D$2
Extending Across
=G2*$D2
=H2*$D2
Extending Down and Across
Use $D$2
From your question it seems that you are trying to apply the same formula on whole row (or column) of cells and show the result on another row (or column).
The best way to do this is to use something called array formulas or array functions (in libre office). This link has very good explanation - https://help.libreoffice.org/Calc/Array_Functions
The way you would implement this in your case is
Type this formula in cell D1
=C1:C30 *48
and press ctrl + shift + enter
The formula now looks like this with the flower braces {..}
={C1:C30 *48}
and the formula gets applied all the way from D1 to D30.
You can even extrapolate the same concept to a whole matrix (for example: A1:C10)
(The way to tell excel/open office/ libre office that you wrote an array formula is to press ctrl + shift + enter. Never press enter as that will break the array function and convert it to a regular function)