Forum Discussion

Chandu_sandy's avatar
Chandu_sandy
Frequent Visitor
2 years ago

current month vs previous month

When i try to add 2 different measures like below ( sales mtd previous and current) the table is showind 2 columns for 2 different months.
 
Sales MTD Previous =
CALCULATE(
    sum('total'[sales]),
    DATEADD('Date'[Date], -1, MONTH)
)
 
Sales MTD current = CALCULATE(
    sum('total'[sales]),
    DATESMTD('Date'[Date])
)

 

is there any way to get only one column per month.
thanks.

1 Reply

  • Anonymous's avatar
    Anonymous
    Not applicable

    Hi Chandu_sandy ,

     

    It seems impossible, because every time you create a measure you are generating one column of data, so when you apply two measures you are generating two columns of data.

     

    Hope it helps!

     

    Best regards,
    Community Support Team_ Scott Chang

     

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