Algorithm that converts a DAG with monetary flows into an OLAP cube for granular reporting, mapping each level as a dimension