Forum Discussion
Relative date filter true DAX
- 7 years ago
Hi dennisdepoorter,
That's impossible. I have added some comments in the snapshot below. It's a COMMA in the formula while it's a DOT in the error message.
1. Please upgrade the Desktop to the latest version.
2. Try this formula.
Quantity L30D = CALCULATE ( SUM ( 'Order Product'[Quantity] ), DATESBETWEEN ( 'Order'[ActivatedDate].[Date], (MIN ( 'Order'[ActivatedDate] ) - 30), MIN ( 'Order'[ActivatedDate] ) ) )Best Regards,
Dale
Hi dennisdepoorter,
I created a similar model. But no issues occurred. The most important thing is it shouldn't return an error message about the MIN function. I'm very sure. I would suggest you delete it and rebuild it again.
Best Regards,
Dale
I made a test enviroment... and have the same error.
Would be nice if you can give it a view!
https://www.dropbox.com/s/vupkg4chx07v5hf/test.pbix?dl=0
- v-jiascu-msft7 years ago
Microsoft Employee
Hi dennisdepoorter,
It's quite strange. I saw a dot rather a comma after "30" when I opened the report. I changed it into a comma. It ran into another issue, which can be solved easily by adding a Date table or using a formula like below.
Quantity L30D = CALCULATE ( SUM ( 'Order Product'[Quantity] ), DATESBETWEEN ( 'Order'[ActivatedDate].[Date], MIN ( 'Order'[ActivatedDate] ) - 30, MIN ( 'Order'[ActivatedDate] ) ) )Please don't share sensitive data here.
Best Regards,
Dale - dennisdepoorter7 years ago
Helper I
v-jiascu-msftthanks for the help, but I still have te same error... So I don't know what's going wrong :(
- v-jiascu-msft7 years ago
Microsoft Employee
Hi dennisdepoorter,
That's impossible. I have added some comments in the snapshot below. It's a COMMA in the formula while it's a DOT in the error message.
1. Please upgrade the Desktop to the latest version.
2. Try this formula.
Quantity L30D = CALCULATE ( SUM ( 'Order Product'[Quantity] ), DATESBETWEEN ( 'Order'[ActivatedDate].[Date], (MIN ( 'Order'[ActivatedDate] ) - 30), MIN ( 'Order'[ActivatedDate] ) ) )Best Regards,
Dale - dennisdepoorter7 years ago
Helper I
Hi Dale,
THANKS THANKS THANKS!!! it was all in the ")" :-)
Altough the formula works, it doesn't show what I want, but I will now dig into it myself...
THANKS THANKS THANKS!!!!
- v-jiascu-msft7 years ago
Microsoft Employee
It's my pleasure. I'm so glad you can move on now.
Best Regards,
Dale