7 Replies Latest reply: Aug 3, 2016 8:03 AM by Bill Markham RSS

    Trying to Sum(intervalss) coming from Postgres DB select Statement

    Shaima Mahmoud

      Hi people,

      I have done a postgres select Query and the resulted data is as follows

       

      |---------------------------------------------------|

      Person  |  Year | Status  |  Days

      |---------------------------------------------------|

      SAM     | 2016 |   free   | 39 Days |

      Yanny   | 2016 |   free    | 71 Days |

      Emy     | 2015 |   free    | 47 Days |

      Ibraham| 2015 |  free     | 30 Days |

      SAM    | 2016 |   busy   | 326 Days|

      Yanny  | 2016 |   busy   | 294 Days|

      Emy    | 2015  |   busy  | 318 Days|

      Ibraham|2015  |   busy  | 335 Days|

      |--------------------------------------------------|

       

       

      I am trying to create atable with a

      dimenion : Status

      Measure : Sum(<Status>Days)

       

       

      I am quite sure the syntax is correct, but the summation is giving result ,

      it is like I am summing wrong things ( - )

       

      I guess this is becasue of 'XX Days' days that comes from postgres select statement.

       

      please anyone tell me how to overcome this issue.

       

      Thanks,