Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
4 years ago
Solved

Month over month graph

Hello all, I created a graph which shows the ROAS for this week and the previous week (x Axis = Day of week and y Axis= ROAS): The measure for the ROAS of the previous week is calculated ...
  • Anonymous's avatar
    Anonymous
    4 years ago

    Hi  Anonymous,Please try to update the formula of measure [ROAS per Day previous Month] as below and check if can return the correct result...

    PS: The part with red font is update ones....

    ROAS per Day previous Month =
    DIVIDE (
        CALCULATE (
            SUM ( 'All data'[NetRevenue (Attributed, ToCnv)] ),
            PREVIOUSMONTH ( 'All data'[Date] ),
            'All data'[Costs (Total, Commission, ToCnv)] <> 0,
            ALL ( 'All data' )
        ),
        CALCULATE (
            SUM ( 'All data'[Costs (Total, Commission, ToCnv)] ),
            PREVIOUSMONTH ( 'All data'[Date] ),
            'All data'[Costs (Total, Commission, ToCnv)] <> 0,
            ALL ( 'All data' )
        )
    )

    How to create Dax logic for this Month and Previous Month

    Values of previous month


    = CALCULATE(SUM(Table[Auftragsbestand]); VALUES(Table[PG]);DATEADD(Table[Datum];-1;MONTH))

    Message error

    If the above one can't help you get the desired result, please provide some sample data in your tables'All data'  and'Date'(exclude sensitive data) with Text format and yourexpected result with backend logic, screenshot of your visuals and special examples. By the way, is there any relationship created between the table 'All data'  and 'Date'? It is better if you can share a simplified pbix file. You can refer the following link to upload the file to the community. Thank you.

    How to upload PBI in Community

    Best Regards