Sử dụng Views Calc - để tính toán cho Fields trong Views module

Sử dụng Views Calc - để tính toán cho Fields trong Views module

Views Calc modules

Views Calc is useful little Drupal module that allows you to perform calculations inside Views.

>> Hướng dẫn tạo Drupal Views Relationships và Entity References phức tạp

>> Hướng dẫn Reloading a View + arguments với Ajax trong Drupal 7

Views Calc allows you to perform Count, Sum, Average or Minimum calculations on a single field.

Let's see an example of how Views Calc works. To follow the example, you need both the Views and Views Calc modules to be enabled.

In this example, I created a content type called "Exercise", with a field called "Miles jogged" that allows me to record how far I've run.

Views Calc - Calculations for Your Fields in Views

  • Go to Structure > Views > Add new view.

  • For your Display format, choose "Views Calc Table". Views Calc does only offer the table format.

  • Click Continue & Edit.

  • Add the field you want to perform calculation on:

  • Click "Settings" next to the Views Calc Table format:

  • Under "Column Calculations", check the box labelled "Display calculation".

  • You can now decide which calculation you want to perform on the field. The four options are Count, Sum, Average and Minimum. In this example, I'll choose "Sum".

  • Click Apply all displays.

  • Save the view. You'll now be able to see that Views Calc is working on your table:

 

Bạn thấy bài viết này như thế nào?: 
No votes yet
Ảnh của Tommy Tran

Tommy owner Express Magazine

Drupal Developer having 9+ year experience, implementation and having strong knowledge of technical specifications, workflow development. Ability to perform effectively and efficiently in team and individually. Always enthusiastic and interseted to study new technologies

  • Skype ID: tthanhthuy

Tìm kiếm bất động sản

 

Advertisement

 

jobsora

Dich vu khu trung tphcm

Dich vu diet chuot tphcm

Dich vu diet con trung

Quảng Cáo Bài Viết

 
PageRank là gì?

Google Pagerank là gì?

Trước tiên chúng ta tìm hiểu lại khái niệm website một chút. Website là tập hợp các trang web, tương tự như một cuốn sách là tập hợp các trang sách. Với các bạn đã từng thiết kế website chắc không xa lạ gì với khái niệm này.

DATC đối mặt nguy cơ mất vốn, thanh khoản kém

DATC đối mặt nguy cơ mất vốn, thanh khoản kém

Công ty TNHH MTV Mua bán nợ Việt Nam (DATC) không thực hiện đầy đủ chức năng nhiệm vụ chính là mua bán nợ và đầu tư dài hạn tái cấu trúc cho doanh nghiệp, sử dụng vốn hiệu quả thấp; tiền gửi và cho vay không đúng chức năng nhiệm vụ, thanh khoản kém và có nguy cơ mất vốn.

Sending Drupal Webform Results to Different Email Addresses

Gửi email đến Email Addresses khác bằng Drupal Webform

One of our students is using Drupal's Webform module for their site's contact form.

Công ty diệt chuột T&C

 

Diet con trung