Profile Picture

Concatenation of expressions

Posted By AlexK 14 Years Ago
Author
Message
AlexK
Posted 14 Years Ago
View Quick Profile
Forum Newbie

Forum Newbie (8 reputation)Forum Newbie (8 reputation)Forum Newbie (8 reputation)Forum Newbie (8 reputation)Forum Newbie (8 reputation)Forum Newbie (8 reputation)Forum Newbie (8 reputation)Forum Newbie (8 reputation)Forum Newbie (8 reputation)

Group: Forum Members
Last Active: 13 Years Ago
Posts: 8, Visits: 1

Hi All,

I'm trying to concaternate some expressions, like this:

=YEAR(Fields!DateTime)+"some text"

what i get is this: <Array(1,1,1,1,1,1........)>some Text

what is the issue?

 

Best Regards,

Alex



Nevron Support
Posted 14 Years Ago
View Quick Profile
Supreme Being

Supreme Being (4,435 reputation)Supreme Being (4,435 reputation)Supreme Being (4,435 reputation)Supreme Being (4,435 reputation)Supreme Being (4,435 reputation)Supreme Being (4,435 reputation)Supreme Being (4,435 reputation)Supreme Being (4,435 reputation)Supreme Being (4,435 reputation)

Group: Forum Members
Last Active: Last Week
Posts: 3,054, Visits: 4,009
Hi Alex,

Depending on the scope in which the expression is evaluation the Fields!DateTime variable will return the values in the data time column, for the records that are in the scope recordset.

What exactly are you trying to achieve and where is this expression placed.



Best Regards,
Nevron Support Team



AlexK
Posted 14 Years Ago
View Quick Profile
Forum Newbie

Forum Newbie (8 reputation)Forum Newbie (8 reputation)Forum Newbie (8 reputation)Forum Newbie (8 reputation)Forum Newbie (8 reputation)Forum Newbie (8 reputation)Forum Newbie (8 reputation)Forum Newbie (8 reputation)Forum Newbie (8 reputation)

Group: Forum Members
Last Active: 13 Years Ago
Posts: 8, Visits: 1

Hi,

I have a DateTime (source is a SQL Table) column and want to get an output like "[Year]/[Month]"

 

Best Regards

 

Alex



Nevron Support
Posted 14 Years Ago
View Quick Profile
Supreme Being

Supreme Being (4,435 reputation)Supreme Being (4,435 reputation)Supreme Being (4,435 reputation)Supreme Being (4,435 reputation)Supreme Being (4,435 reputation)Supreme Being (4,435 reputation)Supreme Being (4,435 reputation)Supreme Being (4,435 reputation)Supreme Being (4,435 reputation)

Group: Forum Members
Last Active: Last Week
Posts: 3,054, Visits: 4,009
Hi Alex,

It is clear that you have a DateTime column, but where is the expression placed - at a chart title, chart values data grouping, chart category data grouping etc.? Also what is your pivot configuration? Please provide us with more info.

Best Regards,
Nevron Support Team



AlexK
Posted 14 Years Ago
View Quick Profile
Forum Newbie

Forum Newbie (8 reputation)Forum Newbie (8 reputation)Forum Newbie (8 reputation)Forum Newbie (8 reputation)Forum Newbie (8 reputation)Forum Newbie (8 reputation)Forum Newbie (8 reputation)Forum Newbie (8 reputation)Forum Newbie (8 reputation)

Group: Forum Members
Last Active: 13 Years Ago
Posts: 8, Visits: 1

Hi

attached is a screenshot of the field with the formula. I hope it helps to understand the issue.

Best Regards, Alex



Attachments
nevron.gif (333 views, 31.00 KB)
Nevron Support
Posted 14 Years Ago
View Quick Profile
Supreme Being

Supreme Being (4,435 reputation)Supreme Being (4,435 reputation)Supreme Being (4,435 reputation)Supreme Being (4,435 reputation)Supreme Being (4,435 reputation)Supreme Being (4,435 reputation)Supreme Being (4,435 reputation)Supreme Being (4,435 reputation)Supreme Being (4,435 reputation)

Group: Forum Members
Last Active: Last Week
Posts: 3,054, Visits: 4,009
Hi Alex,

The screenshot clarifies the task. Lets assume that you have this data set:

DateTime (format is day/month/year) Value

1.2.2010 10
2.2.2010 11
1.3.2010 12
2.3.2010 13
1.2.2009 14
1.3.2009 15

We assume that you want to display a sum of the values for each distinct month in each year.
To do that you need to follow these steps:

1. Make a single Category grouping (not series grouping), with the following TWO group by expressions:

=MONTH(Fields!DateTime)
=YEAR(Fields!DateTime)

This is necessary, because if you simply group by month the records for January 2009 and January 2010 will be in the same group - e.g. each category group will actually contain data for a single month for all years.

2. Set the category label to be:
=MONTH(FIRST(Fields!DateTime))+"/"+YEAR(FIRST(Fields!DateTime))

This expression will display the Year/Month for the current group. Because all records in the group are having the same year and month you only need to get the first date time value in the group in order to make the category label.

3. Create a single values data grouping with Value expression set to:
=SUM(Fields!Value)

Assuming that you started with the default chart (e.g. either from a blank web part or by pressing the RESET button), this should create a bar chart with the following data:

Category Label Value
2/2010 21 (sum of records 1 and 2)
3/2010 25 (sum of records 3 and 4)
2/2009 14
3/2009 15



Best Regards,
Nevron Support Team



AlexK
Posted 14 Years Ago
View Quick Profile
Forum Newbie

Forum Newbie (8 reputation)Forum Newbie (8 reputation)Forum Newbie (8 reputation)Forum Newbie (8 reputation)Forum Newbie (8 reputation)Forum Newbie (8 reputation)Forum Newbie (8 reputation)Forum Newbie (8 reputation)Forum Newbie (8 reputation)

Group: Forum Members
Last Active: 13 Years Ago
Posts: 8, Visits: 1

That's is, thank you!

Best Regards,

Alex





Similar Topics


Reading This Topic