Sum based on condition
Hi,
Request guidance on how SUM can be applied based on condition:
Objective:
Get average difference between invoice and receipt date by customer for Cleared Lines only
Model structure:
1. Customer (line by line) transactional data stored in a flat (non-dimensional file)
2. Customer lines can have either "cleared" or "open" status dynamically determined based on imported data
3. Cleared? (Boolean) : IS NOT BLANK "Clearing Date"
4. Credit days (Number) : If Cleared? is TRUE, "Invoice Date" MINUS "Receipt Date" ELSE 0
5. Average Credit Days (Number): Credit days [AVERAGE: by Customer]
Issue:
On step 4, the difference is calculated for both cleared and open item (i.e. 0)
On step 5, unable to AVERAGE only for Cleared? = TRUE, the average considers for both cleared items and 0 for open items as well and hence is incorrect. It should be calculated for Cleared Lines only.
Screenshots attached for your reference. In Screenshot 3, the average is 7.65 which should actually be 10.35 if only cleared lines are considered.
Thanks for your help,
AM
Comments
-
@anikdas thanks, converting boolean to 0 and 1 and then applying SUM works
0
Categories
- All Categories
- 2.3K Anaplan Community
- Academy
- Anaplan Talent Builder
- Model Design Course
- The Anaplan Way
- Archive
- 2 Idea exchange
- 62 Enterprise Scale
- 1.1K Extensibility
- 21 Intelligence
- 1.6K Planning & Modeling
- 331 Security
- Community Connections
- Connections
- Experiences
- Groups
- Personas
- Employees
- CS Toolkit
- Customer Care Center
- Forums
- Academy & Training
- Community Feedback & Updates
- Japan
- Anaplan Community Japan
- Anaplan Community Japan Knowledge Base
- HyperCare Japan
- JP-Central
- Support-Japanese
- Partners
- Partner Leadership Council
- Partner Product Council
- 724 Platform
- Anapedia
- App Hub
- Centers Of Excellence
- Extensions
- Planual
- Platform Updates
- 724 User Experience
- Profile Builder
- Resources
- Anaplan Advocates
- Anaplan Live!
- Community
- Community Advancement
- Community Connections
- Partner Program
- The Official Master Anaplanner Program
- Videos
- Welcome to the Anaplan Community!
- Success Central
- Support
- Case Portal Link
- Common Support Questions
- HyperCare Redirect
- Known Issues and Workarounds
- Support test page
- SupportFAQ
- Survey
- 2 Training Day Takeaways