Hi ,
I'm Trying to get the current month First 7 days sales to be comparing with lst month First 7 Days
In my data last month is June-2015 (Need to get 1st June-7th June Sales)
Can anyone please help me in this
Thanks in adavance
Hi @Lakshmi1294
Thanks for reaching out to us.
I just want to confirm if you resolved this issue? If yes, you can accept the answer helpful as the solution or share you method and accept it as solution, thanks for your contribution to improve Power BI.
If you need more help, please let me know.
Best Regards,
Community Support Team _Tang
If this post helps, please consider Accept it as the solution to help the other members find it more quickly.
Do you have a date table?
Proud to be a Super User!
Paul on Linkedin.
Yes
Try:
7 days sales vs last month =
VAR _DTYM = DateTable[Year] * 100 + DateTable[Month Number]
VAR _CYM =
YEAR ( TODAY () ) * 100
+ MONTH ( TODAY () )
VAR _LYM =
IF (
MONTH ( TODAY () ) = 1,
( YEAR ( TODAY () ) - 1 ) * 100 + 12,
YEAR ( TODAY () ) * 100
+ ( MONTH ( TODAY () ) - 1 )
)
VAR _CurrentMonth =
CALCULATE (
[Sum sales],
FILTER ( ALL ( DateTable ), DAY ( DateTable[Date] ) < 8 && _DTYM = _CYM )
)
VAR _LastMonth =
CALCULATE (
[Sum sales],
FILTER ( ALL ( DateTable ), DAY ( DateTable[Date] ) < 8 && _DTYM = _LYM )
)
RETURN
_CurrentMonth - _LastMonth
Proud to be a Super User!
Paul on Linkedin.
User | Count |
---|---|
196 | |
80 | |
78 | |
76 | |
47 |
User | Count |
---|---|
168 | |
90 | |
86 | |
80 | |
74 |