1 of 1 people found this helpful
Are you looking for something like this.
1. Current week = DATETRUNC('week',TODAY())
2. current week sales count= COUNTD(if DATETRUNC('week',[Date])=[current week] then ([Sales]) END)
3. % = (1 - ([current week sales count])/200)
Right click on % -> Default Properties - > Number Format - > Percentage
You will get the below result :
Hey thanks! It was super helpful and it perfectly suited my need.
But for my further analysis, I'm trying to have calculated fields with just the sales values and not their count. If I follow the same syntax I'm getting the following error. Cannot mix aggregated and non aggregated arguments within this argument. The calculated field I'm trying to achieve is as follows:
IIF([Date]=[Current day],([Rem_Sales]),IIF([Date]=[Current day+1],([Rem_Sales_1]),IIF([Date]=[Current day+2],([Rem_Sales_2]),NULL))).
Any advice on this? Thanks in advance!
If the post helped you to solve your query please mark it as CORRECT , so as to close the thread.
What's the logic for Rem_Sales,Rem_Sales_1 and Rem_Sales_2.
You can refer below article on what is this error and how to fix this.