Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
I want to write an expression that sums the MLOA Total Days3 column for all instances where Placed Date1 >=5 and where DischargedDate2 >=1000.
If I do: if(Placed Date1>5 and DischargedDate2>=1000, sum(MLOA Total Days3). The only problem is that this way I would have to make selections under my PlacedDate1 and my DIschargedDate2 fields to get the graph to show me the data. I was wondering if there was a way where after I enter this script, the graph would automatically display the sum under these conditions, even if I hit the Clear button in QV.
| Placed Date1 | Discharged Date2 | MLOA Total Days3 |
| 1 | 100 | 12 |
| 2 | 200 | 35 |
| 3 | 300 | 98 |
| 4 | 400 | 31 |
| 5 | 500 | 7 |
| 6 | 600 | 1 |
| 7 | 700 | 2 |
| 8 | 800 | 2 |
| 9 | 900 | 0 |
| 10 | 1000 | 2 |
| 11 | 1100 | 2 |
| 12 | 1200 | 24 |
| 13 | 1300 | 0 |
| 14 | 1400 | 1 |
| 15 | 1500 | 2 |
| 16 | 1600 | 0 |
| 17 | 1700 | 0 |
instead of doing IF(CONDITION, SUM(FIELD)), try changing it to SUM(IF(CONDITION, FIELD))
instead of doing IF(CONDITION, SUM(FIELD)), try changing it to SUM(IF(CONDITION, FIELD))
The sum(if(condition,field)) worked! Thank you!