We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date
close icon

Label value taken from Data source

I have a data source with many rows of data, some of the data in a single column is the same, for example a Year column has the same year in all entries

What I want to do is create a label that takes the MAX from that data source and puts it into a label. 

I've tried having {{:MAX(Year)}} in the label with mixed success..

It works for one label, where I can have "Quarter: {{:MAX(Quarter)}}" - which generates a label with "Quarter: 2" perfectly. 

{{:Year}} - just sums all the years in one of my data sources - which is clearly wrong. 

{{:MAX(Year)}} just seems to return that as text... 

5 Replies

SU Suriya Syncfusion Team December 19, 2018 09:15 AM UTC

Hi Gio, 

Please find the response for your requirements: 

{{:Year}} - just sums all the years in one of my data sources - which is clearly wrong. 
Showing the aggregated value as Summation for the label parameter with measure or Integer column (without mentioning any aggregation type such as COUNT, AVG, etc.) and this default behavior. Refer to the online documentation for detail. 

Note: We assumed that column ‘Year’ in your database is integer/numeric type. 

I've tried having {{:MAX(Year)}} in the label with mixed success.. 

It works for one label, where I can have "Quarter: {{:MAX(Quarter)}}" - which generates a label with "Quarter: 2" perfectly and 

{{:MAX(Year)}} just seems to return that as text... 

Sorry for the inconvenience caused. We are able to reproduce the issue with combination of other type more than one columns with different functions inside theLabel Widget, value taken from Data source ” in the following scenario. 
  1. Connected the SQL data source in dashboard designer
  2. Drag and drop the label widget and use the parameter as following:
  1. We got the below result while preview the dashboard from dashboard designer / view the dashboard in dashboard server:
Please confirm, whether you have faced the same problem when using the label parameter in label widget? If yes, we will provide fix for this in our 3.2 service pack which is expected to be release on first week of January 2019. 
Please let us know exact replication procedure if you have faced the issue in any other different scenario and We appreciate your patience. 


GI Gio January 15, 2019 11:37 AM UTC


Apologies for a delayed response as I've been away over the holiday period. 

I've had some success altering the label to this;

I don't appear to be able to link it to a specific data source however, but the ability to specify a datasource & field in a label would be really useful. 

Kind Regards,

VS Venkataprasad Subramani Syncfusion Team January 16, 2019 12:17 PM UTC

Hi Giovanni, 

We are happy to hear that you could progress on this. 

We have provided support to specify the column with its data source name in the label parameters using the following syntax: 

Syntax for specifying a column and data source name: {{:DataSource_Name.Column_Name}}. 

Syntax for specifying a column and data source name with function: {{:function(DataSource_Name.Column_Name)}}. 


If you have more than one data source with the column named “Year” (assuming as measure field here), you can mention the label parameters as shown in the following screenshot:


If your requirement is different kindly share us detailed requirement with necessary screenshots and we will provide you a better solution at the earliest based on your update.  

Venkataprasad S. 

GI Gio February 5, 2019 12:30 PM UTC


I'm using version (we've recently upgraded) of both Dashboard designer and server. 

I'm getting a similar issue on a dashboard where I'd like to show the Global Filter value as a label (rather than a parameter or a value from a data source, as the filter will have a default).

Reading the online documentation appears to show it should work in the same way, {{:Quarter}}  (following the previous examples). 

The label for Year works, but the Quarter one does not. 

RN Renuka N Syncfusion Team February 6, 2019 06:18 AM UTC

Hi Gio, 

In previous example, {{:Year}} here “Year” should be a column with numeric/string values. Likewise if you have a column “Quarter” in your datasource and Global Filter should configure with “Quarter” column, then {{:Quarter}} will work in Label. Could you please share us any images of the issue you faced. 

If you want to show Quarter value of Datetime field in Global Filter and Label. Please follow the steps  

  1. Configure Datetime field to Global Filter element and choose “Quarter” option.
  1. Choose the default value in Global Filter.
  1. Add the following Syntax in Label Widget. Here Global filter Column is “OrderDate”, so the label text will be “{{:quarter(DataSource1.OrderDate}}”
  1. Preview the dashboard, Global filter selected value will be shown in Label.
Please let us know, if you need further assistance. 

Renuka N. 

Live Chat Icon For mobile
Up arrow icon