Power BI is turning 10! Tune in for a special live episode on July 24 with behind-the-scenes stories, product evolution highlights, and a sneak peek at what’s in store for the future.
Save the dateEnhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.
Hi Everyone,
i am trying to calculate "Winter sale" and want to build the dynamic "Date" so that power bi calpture that period and give results according to that.
Below is my DAX, but it is not working, seems that "Date" Measure inside is not accepting same:
Solved! Go to Solution.
Hey @sandee ,
if I understand it right the winter sales should just cover the sales in December, January and February, correct?
In this case I would just filter to these months. Check if the following measure would work:
Winter Sales =
CALCULATE(
[Sales Amount],
MONTH( 'Date'[Date] )
IN {
12,
1,
2
}
)
Also be aware that your approach wouldn't cover February 29th in a leap year.
Hi Selimovd,
this is incredible, you made this DAX very easy , i was working on filter condition on ">= && "<=". and was trying to work on "Date" dax so that i can enter the proper format. but it was not accepting same.
Hey @sandee ,
if I understand it right the winter sales should just cover the sales in December, January and February, correct?
In this case I would just filter to these months. Check if the following measure would work:
Winter Sales =
CALCULATE(
[Sales Amount],
MONTH( 'Date'[Date] )
IN {
12,
1,
2
}
)
Also be aware that your approach wouldn't cover February 29th in a leap year.
My Solution :
thnaks Selimovd....
Hey @sandee ,
I'm happy it worked 🙂
That's also normal, many times I was thinking way too complicated. But when you write more DAX thing will get easier. Keep going 🙂
Have fun and best regards
Denis
Hi Selimovd,
this is incredible, you made this DAX very easy , i was working on filter condition on ">= && "<=". and was trying to work on "Date" dax so that i can enter the proper format. but it was not accepting same.
User | Count |
---|---|
22 | |
11 | |
8 | |
6 | |
6 |
User | Count |
---|---|
25 | |
13 | |
11 | |
9 | |
6 |