Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.
Our Sales Dept produces a sales ratio calendar that excludes weedends and holidays.
The ratios start small at the beginning of the month and reaches 100% at the end of the month.
The monthly forecast is multiplied by the ratio to track their progress on a daily basis.
My PBI report works fine for an item but has the wrong number for a category:
In the example above the MTD Sales is 137 for 17 Jun but it should be 137 + 83 = 220
This is the link to the PBI Report on OneDrive:
https://1drv.ms/u/s!Aq5dyjpfjB3UgYhu2_W4JQPq4inhJQ?e=jfu2sI
Any help would be greatly appreciated!
Solved! Go to Solution.
Hi, @clarkpaul ;
You could modify the MTD Sales column as follows:
MTD Sales2 =
var _a=CALCULATE(SUM([Sales]),FILTER(ALLEXCEPT('Sales','Sales'[Category]),[Date]<=EARLIER(Sales[Date])))
var _b=CALCULATE(SUM([Sales]),FILTER(ALLEXCEPT('Sales','Sales'[Item]),[Date]<=EARLIER(Sales[Date])))
return IF(CALCULATE(DISTINCTCOUNT([Item]),FILTER(ALL(Sales),[Category]=EARLIER([Category])&&[Date]=EARLIER([Date])))=1,_a,_b)
The final output is shown below:
Best Regards,
Community Support Team_ Yalan Wu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi, @clarkpaul ;
You could modify the MTD Sales column as follows:
MTD Sales2 =
var _a=CALCULATE(SUM([Sales]),FILTER(ALLEXCEPT('Sales','Sales'[Category]),[Date]<=EARLIER(Sales[Date])))
var _b=CALCULATE(SUM([Sales]),FILTER(ALLEXCEPT('Sales','Sales'[Item]),[Date]<=EARLIER(Sales[Date])))
return IF(CALCULATE(DISTINCTCOUNT([Item]),FILTER(ALL(Sales),[Category]=EARLIER([Category])&&[Date]=EARLIER([Date])))=1,_a,_b)
The final output is shown below:
Best Regards,
Community Support Team_ Yalan Wu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
v-yalanwu-msft,
I ran into a problem when there is no sales for a date. The MTD value disappears:
I updated the PBI with the new data:
https://1drv.ms/u/s!Aq5dyjpfjB3UgYhxIrpOVz_n7WzpYQ?e=a8hVTF
Thank you very much!!!
@clarkpaul , are you using datesmtd with date table ?
example
MTD Sales = CALCULATE(SUM(Sales[Sales Amount]),DATESMTD('Date'[Date]))
Amitchandak,
I added your recommendation as
Thanks
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
109 | |
98 | |
77 | |
66 | |
54 |
User | Count |
---|---|
144 | |
104 | |
101 | |
86 | |
64 |