DEV Community

Cover image for การใช้สูตร PARENTGROUPVAL ใน Salesforce เพื่อสร้าง Report
Tulip Pattra B
Tulip Pattra B

Posted on

การใช้สูตร PARENTGROUPVAL ใน Salesforce เพื่อสร้าง Report

มา! มา! ใช้สูตร Parentgroupval หา percentage
Requirement: คำนวณอัตราการ Converted Lead ในแต่ละ Lead Source 🚀

  1. จัดตารางให้พร้อม!

    • Group Row: เลือกเป็น Lead Status
    • Group Column: เลือกเป็น Lead Source
    • ใส่ข้อมูลสำคัญอย่าง ชื่อ และ นามสกุล ของ Lead อย่างน้อย 1 พารามิเตอร์ เพื่อให้รายงานของคุณสามารถโชว์จำนวนได้เต็มที่!
    • ใส่ Filter = Closed - Converted, Closed - Not Converted. หลังจากจัดตารางเรียบร้อยแล้วกดรัน report หน้าตาจะประมาณนี้ Image description
  2. ถึงเวลาทำสูตร!

    • ไปที่ไอคอน Expand ด้านขวา แล้วคลิก Create Formula
  3. เลือกฟังก์ชันที่เหมาะสม!

    • ไปที่แท็บ Functions และค้นหา PARENTGROUPVAL อย่าเพิ่งกด Insert Image description
  4. หน้าจอจะบอกอะไรเรา!

    หน้าจอนี้จะมี 3 ส่วนหลัก ๆ:
    Image description

    • ส่วนที่ 1: เลือกตำแหน่งที่จะให้สูตรคำนวณ (ทั้งใน Row และ Column) เลือก Grand Total สำหรับ Row เพราะเราจะคำนวณจากจำนวนรวมทั้งหมด
    • ส่วนที่ 2: เลือก Field ที่จะคำนวณใน Column ให้ตรงกับการตั้งค่าในส่วนแรก
    • ส่วนที่ 3: ใส่สูตรที่คุณต้องการคำนวณ อย่างเช่น Record Count ที่จะช่วยให้คุณนับจำนวน Lead ได้
  5. ตรวจสอบสูตรโดยการคลิก Check Validity (ถ้ามั่นใจว่าถูกต้องก็คลิก Apply เลย!)

  6. ผลลัพธ์นี่ยังไม่จบ เพราะต้องการแสดงให้เห็นว่าสูตรทำงานยังไง ไปต่อขั้นตอนถัดไป
    เมื่อสูตรแรกเสร็จแล้ว คุณจะเห็น Grand Total ของ Row ซึ่งเป็นค่าเลขรวม
    Image description

  7. เพิ่มสูตรใหม่ในตาราง!

    คราวนี้จะทำสูตรใหม่ให้แสดงในตาราง! อย่าพึ่งเบื่อไปนะคะ!

    • ให้คุณทำการ copy สูตรเดิมเก็บไว้ และคลิก Create Formula ใหม่ ตั้งชื่อเป็น Percentage และเลือก Formula Output Type เป็น Percent
  8. ทำการคำนวณ!

    ใส่สูตรในลักษณะนี้:

    • RowCount / PARENTGROUPVAL(RowCount, ROW_GRAND_SUMMARY, LEAD_SOURCE)

Image description

แล้วกด Check Valid formula เพื่อดูว่าสูตรคุณใช้ได้หรือเปล่า แล้วคลิก Apply

เย้! สูตรเสร็จแล้ว! 🎉

ตอนนี้คุณจะได้เห็น เปอร์เซ็นต์ ของแต่ละ Lead Source สามารถนำไปวิเคราะห์ต่อได้ว่าช่องทางไหน converted ได้มากที่สุด!

Image description

ถึงแม้ว่า Lead ที่เข้ามาจะเป็นจากช่องทาง web จะมากที่สุด แต่ไม่ใช่ช่องทางที่มีอัตราการถูก converted มากที่สุด กลับกัน Lead ที่มาจาก Partner Referral มาน้อยที่สุด แต่อัตราการ converted เป็น 100% จากช่องทางนี้ 😎


จบ😄

Sentry image

See why 4M developers consider Sentry, “not bad.”

Fixing code doesn’t have to be the worst part of your day. Learn how Sentry can help.

Learn more

Top comments (0)

Sentry image

Hands-on debugging session: instrument, monitor, and fix

Join Lazar for a hands-on session where you’ll build it, break it, debug it, and fix it. You’ll set up Sentry, track errors, use Session Replay and Tracing, and leverage some good ol’ AI to find and fix issues fast.

RSVP here →

👋 Kindness is contagious

Please leave a ❤️ or a friendly comment on this post if you found it helpful!

Okay