Discussions
Categories
Groups
Community Home
Categories
INTERNAL ENABLEMENT
POPULAR
PUBLIC CLOUD
PRIVATE CLOUD
Quick Links
MY LINKS
HELPFUL TIPS
Back to website
Home
Intelligence (Analytics)
CrossTabl + computed column
nuno
Hello,
I made a crosstab that contains time values per column. Now i need to make the difference between 2 of the columns. Is it possible?
Find more posts tagged with
Comments
mwilliams
Hi nuno,
You could click on the box next to one of the measures in your crosstab and choose add a derived measure.
nuno
hello,
thank you for the answer but i suppose what i want to do is impossible.
In the attachment is my report. Please take a quick look.
what i would like is 5/6 extra columns that would make me the difference between column1-column2; column2-column3; column3-column4 ....and so on....
zkhalid
Hi All,
I need help regarding cross tab reports. I want a report something like this
_______________________________________________________
Users | APP1 | APP2 | APP3 | APP4 ...
_______________________________________________________
user1 | Active | Active| Inactive| Active...
user2 | Active | Active| Active | Active...
user3 | InActive | Active| Inactive| Active...
..
.
.
Now i got the APP1,APP2 dynamically as well as user1,user2. but how to get the status against the application. It only allows to drop aggregate columns in summarize data field. Please help.
mwilliams
Hi zkhalid,
When you create your dataCube, edit the summary field to have the function "FIRST" rather than "SUM". This should allow you to pass the string field through.
Hope this helps.
mwilliams
nuno,
What version of BIRT are you using?
nuno
hi,
I am using 2.3.1
mwilliams
nuno,
Do you want the crosstab set up like:
col1 | col2 | diff col2/col1 | col3 | diff col3/col2 | col4....etc.
Or do you want:
col1 | col2 | col3 | col4 | col5 | col6 | diff col2/col1 | diff col3/col2....etc
?
Let me know. I'll see if I can help figure something out to work for you.
nuno
hello michael,
Anyway it would work for me...as far as I could have the columns!
Thank you very much for the effort!
Is it possible??
nuno
Anyway to do this?
mwilliams
nuno,
Take a look at this example. It uses the derived measure column to show the "change" in sales from month to month. Hope this helps.
nuno
that is what i want but i could not understand your code here:
why do we need to make a persistent global variable??
thnks a lot
temp = reportContext.getPersistentGlobalVariable(dimension["Group1"]["Territory"]);
reportContext.setPersistentGlobalVariable(dimension["Group1"]["Territory"], measure["Sales"].toString());
temp = parseInt(temp);
measure["Sales"] - temp;
mwilliams
nuno,
The reason I did this is because I can have a dynamic amount of PGV's uniquely named as the dimension value. This makes for easy tracking of past values. If you know all the values that are going to be down the side of the crosstab row dimension, you could just prename all of the variables and you wouldn't have to do the PGV's. For example, I could have just made my variables north, south, east, and west and changed the values, but if a new territory was introduced in the database, say, midwest, the PGV way would handle that while static variables you set up wouldn't. Let me know if my explanation doesn't make sense.