Concatenation of expressions


Author
Message
Alexander Kammerzell
Alexander Kammerzell
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
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
Nevron Support
Supreme Being (4.5K reputation)Supreme Being (4.5K reputation)Supreme Being (4.5K reputation)Supreme Being (4.5K reputation)Supreme Being (4.5K reputation)Supreme Being (4.5K reputation)Supreme Being (4.5K reputation)Supreme Being (4.5K reputation)Supreme Being (4.5K reputation)
Group: Administrators
Posts: 3.1K, Visits: 4.2K
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


Alexander Kammerzell
Alexander Kammerzell
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
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
Nevron Support
Supreme Being (4.5K reputation)Supreme Being (4.5K reputation)Supreme Being (4.5K reputation)Supreme Being (4.5K reputation)Supreme Being (4.5K reputation)Supreme Being (4.5K reputation)Supreme Being (4.5K reputation)Supreme Being (4.5K reputation)Supreme Being (4.5K reputation)
Group: Administrators
Posts: 3.1K, Visits: 4.2K
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


Alexander Kammerzell
Alexander Kammerzell
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
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 (367 views, 31.00 KB)
Nevron Support
Nevron Support
Supreme Being (4.5K reputation)Supreme Being (4.5K reputation)Supreme Being (4.5K reputation)Supreme Being (4.5K reputation)Supreme Being (4.5K reputation)Supreme Being (4.5K reputation)Supreme Being (4.5K reputation)Supreme Being (4.5K reputation)Supreme Being (4.5K reputation)
Group: Administrators
Posts: 3.1K, Visits: 4.2K
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


Alexander Kammerzell
Alexander Kammerzell
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
Posts: 8, Visits: 1

That's is, thank you!

Best Regards,

Alex


GO

Merge Selected

Merge into selected topic...



Merge into merge target...



Merge into a specific topic ID...




Similar Topics

Reading This Topic

Login

Explore
Messages
Mentions
Search