Ratio in Sales and hours

Hi @Yrstruly

This Dax is for a calculate table that return the store with high decrease sales from previous month.

MoM =
TOPN (
    1,
    SELECTCOLUMNS (
        SUMMARIZECOLUMNS (
            'Raw data'[store_name],
            dim_date[Year],
            dim_date[Month],
            "Sales", [tSales],
            "PM Sales", CALCULATE ( [tSales], DATEADD ( dim_date[Date], -1, MONTH ) )
        ),
        "Store", [store_name],
        "Sales", [Sales],
        "PM Sales", [PM Sales],
        "Delta", [PM Sales] - [Sales],
        "Delta %", DIVIDE ( [Sales], [PM Sales] ) - 1
    ),
    [Delta]
)

FastFood_Sales-JB.pbix (2.3 MB)

Note: Please use @Melissa Date Table

2 Likes