Feels like I'm asking something very obvious, but I can't seem to find a configuration for showing 'Grand Total' last (bottom or right) instead of first (top or left).
It is the first question asked by new Active Pivot Live users
Actually, you can't have the grand total row/column at the bottom/right hand side of the pivot table like in excel. Someone has already asked for such a behavior but since it's a very rare demand, it is not in our short term roadmap. However, if you express an interest in having such a feature, it can be reconsider.
ActivePivot Live only displays the result of your MDX query, as sent by the server. Thus, if you need to display grand totals on the bottom/right of your view, you can do it by modifying your MDX :
exclude the grand totals from your axis
add it with a union or braces at the end
You can use this expression:
Hierarchize(Set_Expression , POST)
instead of
Hierarchize(Set_Expression)
in your Mdx query.
Related
I've been recently hired as an intern, and a challenge my area has come accross is how to highlight the closest available medical appointment.
Of course, I know that in excel such a thing would be pretty simple, with a matrixial formula like {=MIN(IF( range > current_date_and_time ; range ))} and as such, in PowerBi it should be just as simple.
However, the PowerBi table the area is dealing with shows the entire agenda and another column indicates if it has been reserved or not (with a 1 and 0). So, I'm wondering how to incorporate this condition toe excel formula, and in the end, how to get the closest AVAILABLE appointment in the agenda.
Eventually, the idea is to apply this "filter" for each doctor, and then aggregate by area.
I also know that good manners dictate I show you the data, but this is work related, so I can't do that.
Thanks beforehand, and sorry for the trouble
the problem has been solved, though by means of a different answer. THANKS
I have a huge table with data structured like this:
And I would like to display them in Spotfire Analyst 7.11 as follows:
Basically I need to display the columns that contain "ANTE" below the others in order to make a comparison. Values that have variations for the same ID must be highlighted.
I also have the fields "START_DATE_ANTE" and "END_DATE_ANTE" which have been omitted in the example image.
Amusingly, if you were limited to just what the title asks, this would be a very simple answer.
If you wanted this in a table where the rows are displayed as usual, and the cells are highlighted, you can do this by going to properties, adding a newGrouping where you select VAL_1 and VAL_1_ANTE and add a Rule, Rule type "Boolean expression", where the value is:
[VAL_1] - [VAL_1_ANTE] <> 0
This will highlight the affected cells, which you can place next to each other. You can even throw in a calculated column showing the difference between the two columns, and slap it on right next to it. This gives you the further option to filter down to only showing rows with discrepancies, or sorting by these values.
However, if you actually need it to display the POSTs on different lines from the ANTEs, as formatted above, things get a little tricky.
My personal preference would be to pivot (split/union/etc) the data before pulling it in to Spotfire, with an indicator flag on "is this different", yes/no. However, I know a lot of Spotfire users either aren't using a database or don't have leeway to perform the SQL themselves.
In fact, if you try to do it in Spotfire using custom expressions alone, it becomes so tricky, I'm not sure how to answer it right off. I'm inclined to think you should be able to do it in a cross table, using Subsets, but I haven't figured out a way to identify which subset you're in while inside the custom expressions.
Other options include generating a table using IronPython, if you're up to that.
I have the following problem:
A datasheet with a column (HOUR) and another column (AM/PM). Entries in the first column consist of 1,2,3,4,5,6,7,8,9,10,11, or 12, the second column consists of 'AM's or 'PM's. Together they define the time of an incident (regarding the below problem, note that I am not allowed to create a new column in the source datasheet or change existing columns). The below formulas 1.) to 3.) work excellent for getting '1's or '0's for incidents that happened either between 8AM and 4PM, or outside of this time window, as long as I create a new column somewhere.
1.) =IF(AND(A1>=8, A1<=11),IF(B1="AM",1,0),0) + IF(AND(A1>=1, A1<=4),IF(B1="PM",1,0),0) + IF(AND(A1=12),IF(B1="PM",1,0),0)
2.) =--OR(AND(A1>=8, B1="AM", A1<>12), AND(OR(A1<=4, A1=12), B1="PM"))
3.) =--OR(AND(OR(A1={8,9,10,11}),B1="AM"), AND(OR(A1={1,2,3,4,12}), B1="PM"))
However, I want the "1"s to be summarized - without creating an extra column - as calculated field in a pivot table. While excel doesn't accept the 3.) formula at all in the calculated field option, excel accepts 1.) and 2.), but puts out only "0"s in all pivot cells. The below is one of the formulas that puts out only "0"s in the pivot table.
=--OR(AND(HOUR>=8,'AM/PM'="AM",HOUR<>12), AND(OR(HOUR<=4,HOUR=12),'AM/PM'="PM"))
The field value settings don't make a difference, and the fields that are created new with 1.) or 2.) cannot be filtered for "1"s or 0"s, so something must be wrong with the field calculation I guess. Does anybody know what I need to change to make it work? Are there special rules for formulas in pivot tables that apply to formula 1.) and 2.) to make them work?
Thanks for any help on this
I think the limitation is not you, but Excel.
See here for description of what is possible, as well as this question
I tried your code and indeed I see it's not working. Even with a simple if code it doesn't seem to work. I think it's is explicitly called a calculated field because you are only able to calculate the fields in the Sum/Total/Count etc. column.
Have a look at MS, this function is quite limited.
I would try to make another work-around to accomplish your goal.
Microsoft
The source data for my Excel PivotTable looks like the following (this is a simplification):
id name score
1 john 15
2 james 2
3 pat 14
4 jake 12
...
I have a PivotTable that uses this as a data source. Now, what I want to do is have the PivotTable only consider entries if their id is less than 100. This is theoretically achievable by having a Report Filter on id, and de-selecting any number greater than 100. But that's rather absurd.
How can I filter out data using a Boolean constraint? I've tried various methods, none of which worked. It seems like calculated fields are the key, but it doesn't seem possible to create a filter on calculated fields.
I'm using Excel 2011 for Mac, if that makes a difference. I'm a programmer, but I've never programmed in Excel, so if that's the solution, I'd request baby steps. :) Thank you!
AFAIK, In Excel 2011, you cannot use a report filter to apply any kind of filter. You have to manually check/uncheck the values that you want or don't want.
The alternative that I can think of is to insert a column before your data and enter the formula
=If(B2<100,TRUE,FALSE)
and copy it down using Autofill. (See screenshot below)
Now create a pivot and put the field "Less Than 100" in the report filter and simply select TRUE (See screenshot below)
If you don't want to go down that path then move the ID field to ROW LABEL from REPORT FILTER where you can use a filter.
A Report Filter is exactly what I would do, but rather than manually de-selecting the fields as you suggest you would do I would apply a Label filter to be less than the cut-off point, which in your example is 100.
I haven't used Excel on Mac, but on Windows on the PivotTable Field List, to the right of the id field click the little black arrow, and select Label Filters -> Less Than and then enter 100 in the dialogue that pops up.
Given the inherent value of PivotTables is the ability to apply filters exactly for this sort of scenario I don't think I'd do anything more complicated.
I have a column with 595 rows. Then I proceeded to add 20.
(Note this excel sheet with the 595 entries was already in place before I started working on it. The sort feature was working correctly, as was the filter feature).
So now, I can still USE the sort and filter methods, but it does not take into account these 20 new rows. Any ideas?
Also, I cannot remove the borders on these 20 new rows. They are pretty thick and say I just did 'no borders', it doesn't modify anything.
It seems like there's a 'cutoff' at 595 or something. Very weird.
Another solution which may not be as obvious is to Un-click the filter button under the data tab and then re-click filter.
I had the same problem. After 45 minutes of experimenting and 'googling' for solutions it turned out that the new names I had entered did not have a space in front of them like ALL the other names in that column did. So check to see if the data in the columns are the same distance from the cell wall. If they are different, try adding or removing a space and re-sort. Good Luck
I had the same problem using an absence tracker downloaded Excel worksheet from Microsoft, where I added 30 rows. I fixed the problem by clicking/activating the table and viewing the design tab. Click Resize Table and edit the table range. This color coded the rows and allowed the filter to include the added rows.
I had this same problem, expanding the 'fill handle' as John Bustos (Nov 12 '12 at 17:29) suggested was all that I needed. I didn't have to turn filters off and on afterward either.
When you set up the Filter, it accounts for the range of data you initially have. When you add rows, they are outside of that range. So if you have one additional column that has something in it, like the word "blank" or just "X" or something, and make it go down to row 1000 or 2000 or something, then when you add information in new rows, it should keep the full filtered range, and the sorting would also include the full range, all the way to the row 1000 or 2000 or whatever you make.
As #JohnBustos suggested, the 'zebra' type row color is an outcome of choosing a certain condition in a pivot table.
When you add new rows to a table extracted from Pivot table, in order to include filter conditions/ sort for newly added rows, you need to -
Go to far bottom right in row 595,
you should have some kind of a fill handle,
drag it down to now include your new rows too.
Make sure there isn't a space before the new data. That will sort in two batches.
There's a little handle at the bottom right corner of your table (as it exists)...drag this to the bottom of where your new data exists, and it should auto-expand the table to include the table design + filtering. Took me forever to figure out