I have a set of data that needs to be displayed as a crosstab in Cognos. Example data includes
ID, Month, Year, State
1, 10, 2008, 25
2, 10, 2008, 26
The problem is that in the crosstab, the month column is duplicated for each row instead of using the same column for the month.
Example:
ID 2008 2008
10 10
1 25
2 26
I'm not a Cognos guy but it sounds like your detail is not wrapped in an aggregate function like SUM(x).
Cognos allows you to enter SQL Queries in addition of plain reporting of data. Try to dive into that
Can you tell us what you drug out into your cross tab by the row, column and measure drop zones? Is your data source relational data or a cube? With a little more info, I think we can figure this out.
Chris
Normally in Report, basic purpose is to show the Aggregations based on some criteria. but in your example, the data provided does not make any sense that WHAT actually you want in Cross Table?...if you can define what you want then solution is really simple...
Reworked the report after working on the view to keep the problem from occurring again.
Related
I have the following Pivot Table:
I am trying to derive the number of cases created per resource for a given month. I.e. for Jan 2021 the formula would be 768/9 = 85.333...
I've tried to use a Calculated Field, but the issue I'm having is that the PivotTable uses the underlying data e.g. for a given case, create date is 1/1/2022 and the resources on that day is 8. It is then dividing the numeric value of 1/1/22 by 8 and coming up with a value in the thousands, for obvious reasons, and then working out the average/sum/etc for all of the cases within that month. What I need is a way of just doing B5/C5 but within the pivot table itself, rather than a column outside of the pivottable. Is this possible?
P.S. Sorry if this is a basic one that has already been answered, but I'm not always sure on the correct terminology for PivotTable functionality so I've likely been googling like a 6 year old.
Thanks,
I'm completely new to Excel and am actually using it for the first time for a math paper, so I'm pretty lost to start with.
I have a large spreadsheet of data. It's organized in a table with the headers: country code, country name, date, and total. The dates range from April, 2020 to March, 2021 for 203 countries.
What I'm trying to do is to take the total amounts from each country each day.
I've included some screenshots from my excel spreadsheet:
Adding this data isn't so bad, right now I'm using the function =SUMIF(range, criteria (I'm just using ">0")). But when I have so much data to add, this feels really inefficient.
I was wondering if there was a function or if I could somehow create a function, that would let me input a country code and it would sum every row that has that country code? Or something similar that would speed up the process?
I'm sorry if this isn't the best-formatted question, it's my first time asking anything on Stack Overflow and I still new to the expectations from the community. Please let me know any extra information I can provide, ways I can clarify, or anything else.
Thank you to everyone in advance!
Depending on what you want to look at you can either use SUMIF / SUMIFS or a PIVOT table.
For your example above, I would recommend a PIVOT table. You can find further information on PIVOT tables here. Simply drag and drop the values you want to have in each row / column into the respective fields.
In case you then want the result to look nice, you can find information on formatting PIVOT tables here
I have an excel datasheet with more than 1,000,000 rows and 80 columns. the datasheet contains sales information of a chain store with more than 1700 store nationwide. each store is repeated 52(weeks in a year)* about 30 (products sold in that given week)* 2(two years). I want to convert the rows corresponding to products to columns. I can't do that using transverse because the products sold each week might not be exactly the same as those sold next week. do you have any solutions?
thanks
I just made a very simplified version of that excel file. the problem is that the products sold are not the same each week. there is a limited set of product, but only some of the items are sold each week
https://drive.google.com/open?id=1B2vjIL2hemfQNrCz0X6u_pzi7Euy6IWa3Lj0_HzDXDE
This isn't much of an answer yet - but it either will become one or I'll delete it, depending on the OP's response.
I'm thinking that transverse/transpose is the wrong term for what you're trying to do.
Perhaps you're just trying to better organize/visualize this data, something similar to one of these Pivot Tables:
or
These are just two of the infinite ways you can organize data in a Pivot Table.
Is that similar to what you're trying to do? If so I'll share some more info.
If this quantity of data is going to keep coming your way, way you really need is to start using an Access database to get this under control and be able to report on it properly (and easily, once it's setup).
I would like to know how to create calculated columns in my data set I have month and year column and cost column available using property control like to create below columns;
1.full year 2015 - this column value be constant
2.ytd 2015 - this column total change based on selection
3.ytd 2016 - this column total change based on selection
4. Full year 2016 - this column total change based on selection
So I wanted to calculate these columns using custom expression and how to use property control in spotfire.
There really isn't enough information here for us to help you. We need to know two main things --
1) What your data looks like (I can grasp this from your explanation, but if you don't know what you're doing in Spotfire itself, it makes it harder for us to get the code we're giving you correct)
2) How you want to display your data. Ideally, this could be shown with a table or an image, with an example input and output.
MY BEST GUESS is that you want to display in a pivot table the full year's cost and the YTD cost for both 2015 and 2016. I don't know what you mean by "based on a selection".
If you really do want a calculated column, and not a custom expression, the general format would be something like this:
If([Month] < Month(DateTimeNow()) and Year([Year]) = 2015, [Cost], 0)
This would allow you to sum up the 2015 YTD.
If this is not what you are looking for, please provide more explicit information.
Is it possible to calculate a percentage change in a Cognos Report?
Currently, I have a crosstab that has years as the columns and widgets in the rows with a calculation of total revenue. I am looking to calculate the annual % increase. New to Cognos, but I could accomplish this using other tools.
Any help will be very much appreciated.
Sorry for the late answer to your question but perhaps it will help others who see it.
It's kind of annoying, but it can be done. If you have one Query which uses an input parameter to select the year, perhaps it is a filter that says [Year] = ?YearPrompt?, then you can make a second Query which uses the filter [Year] = ?YearPrompt? - 1. Then, you can join these two queries, and the third query (made by joining the first two) will have both this year's revenue, and last year's revenue, available to it for a calculation, such as what the percent change is.
You need to create a query calculation item as one of the columns and in it you take Year2 - Year1(You can choose the exact columns you already have in the report using the Data Items tab when you are making the query calc) Also make sure you make this query calc a % in its format.