Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi All,
I have a requirement wherein we need to have table showing sum of two metrics based on two different dates.
This is the table sample:
Date | Approved | Total |
10/13/2017 | 20 | 61 |
10/14/2017 | 30 | 62 |
10/15/2017 | 25 | 81 |
10/16/2017 | 16 | 73 |
10/17/2017 | 18 | 78 |
10/18/2017 | 19 | 91 |
10/19/2017 | 21 | 62 |
where in sum(Total) should be based on the TotalDate field and sum (approved) should be based on another field called Approveddate. and Date in the table is the calendar date.
Kindly let me know if the requirement is unclear.
Thanks,
Anupama Jagan
not clear.
what is your expected result here ,
-mahesh
The table is the requirement where
Date - to show last 7 days
Approved - sum (Approved) based on Approveddate
Total - sum (Total) based on TotalDate
Approved and Total are two metrics in our application
Kindly let me know if its still unclear
May be this?
Sum({<Approveddate = {">=$(=Max(Approveddate - 7)) <=$(=Max(Approveddate))"}>} Approved) for Approved
Sum({<TotalDate= {">=$(=Max(TotalDate- 7)) <=$(=Max(TotalDate))"}>} Total) for Total
=Sum({<Date = {">=$(=Date(Today()-6,'MM/DD/YYYY'))<=$(=Date(Today(),'MM/DD/YYYY'))"}} approved)
=Sum({<Date = {">=$(=Date(Today()-6,'MM/DD/YYYY'))<=$(=Date(Today(),'MM/DD/YYYY'))"}} Total)
or
=Sum({<Date = {">=$(=Date(Today()-6,'MM/DD/YYYY'))<=$(= Date((Max(Date)), 'MM/DD/YYYY')
))"}} approved)
=Sum({<Date = {">=$(=Date(Today()-6,'MM/DD/YYYY'))<=$(= Date((Max(Date)), 'MM/DD/YYYY')
))"}} Total)
The dimension should show today()-7 days..is it possible as calculated dimension?
I don't recommend to use as calculated dimension
If(Dimenion >= Today()-7 and Dimension <= Today(), Dimension)
Im still not clear about your solution.
Sum({<Approveddate = {">=$(=Max(Approveddate - 7)) <=$(=Max(Approveddate))"}>} Approved) for Approved
Sum({<TotalDate= {">=$(=Max(TotalDate- 7)) <=$(=Max(TotalDate))"}>} Total) for Total
if I use this and dimension as TotalDate , will Approved col show sum for the approved date?