Forum Discussion
Dax Sales by Period
Can you attach a screenshot of the data you are working with
- v-huizhn-msft8 years ago
Microsoft Employee
Hi ricardo_cvo,
It's hard to provide specific solution without sample table. After research, the following thread and articles are useful. In my oppion, you can do your cases after learn them carefully.
filtering-and-comparing-different-time-periods-with-power-bi
Dynamically comparing current totals to last year totals
Total Sales X Custom Period (day 26 current month to day 25 next month)
POWER BI: ModelingThanks,
Angelia- ricardo_cvo8 years ago
Helper I
Thank you all for the answers:
The data unfortunately can not share, but I am using the formulas below for 30 days and for 60 days:
30 Days = CALCULATE(SUM(FatSales[);FILTER(ALL(FatVenda[Date of Sale]);FatVenda[Date of Sale]>TODAY()- 30))
60 Days = CALCULATE(SUM(FatSales[Date of Sale]);FILTER(ALL(FatVenda[Date of Sale]);FatVenda[Date of Sale]>TODAY()- 61))
Tanks
- v-huizhn-msft8 years ago
Microsoft Employee
Hi ricardo_cvo,
The syntax is right, you get the expected result? If it is, please mark your reply as answer, so more people will benefit from here.
Thanks,
Angelia