Forum Discussion

milex01's avatar
milex01
Frequent Visitor
5 years ago
Solved

How to create actual cashflow?

Hi everybody,   I would like to create cashflow statements by using power bi. I do have some simple case that we can use to exercise this cashflow as following?   Anyone can suggest me a way of w...
  • Anonymous's avatar
    Anonymous
    5 years ago

    Please check example prepared on https://1drv.ms/u/s!AgAlCRkx-ILRgwn91AzYmq42ncQZ?e=pbuKCg

     

    You need to create a date dimension table and relate this table to your purchase and sales tables. Then you can add a matrix visual to display the data as per your example. When you add the matrix table, make sure you go to Values then click the "Show on rows" toggle so that the Purchase and Sales appear as rows:

     

  • v-xulin-mstf's avatar
    v-xulin-mstf
    5 years ago

    Hi milex01,

     

    Please try this:

    //calculated column
    Ending balance = 
    CALCULATE(
        SUM(PurchaseTable[Amount])+SUM(SalesTable[Amount]),
       FILTER(
           ALL(Dates),
           MONTH(Dates[Date])<=MONTH(EARLIER(PurchaseTable[Date]))))
    //Measure
    Start balance = 
    CALCULATE(
        MAX(PurchaseTable[Ending balance]),
        FILTER(
            ALL(Dates),
            MONTH(Dates[Date])=MONTH(MAX(Dates[Date]))-1
        ))

    Here is the output:

    The pbix is attached.

     

    Best Regards,
    Link

     

    If this post helps then please consider Accept it as the solution to help the other members find it more quickly.