Starting December 3, join live sessions with database experts and the Microsoft product team to learn just how easy it is to get started
Learn moreGet certified in Microsoft Fabric—for free! For a limited time, get a free DP-600 exam voucher to use by the end of 2024. Register now
Greetings PBI Team
I need to calculate the sales according to what is selected in the calendar, for example, if I have selected the year, the sales are calculated based on that selection, and the same for month and day. Here is an example of the measure I have to calculate the sales in the actual month
Can you please give me some help on this? thank you so much
Solved! Go to Solution.
Hi @FABIANSMITS ,
Please try to add a slicer like this:
You can achieve your goal by using sum of sales directly:
Or apply a measure like this:
Measure =
var _a = SELECTCOLUMNS('Calendar',"Date",[Date])
return CALCULATE(SUM('Table'[Total Sales]),FILTER(ALL('Calendar'),[Date] in _a))
Output:
Best Regards,
Jianbo Li
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi @FABIANSMITS ,
Please try to add a slicer like this:
You can achieve your goal by using sum of sales directly:
Or apply a measure like this:
Measure =
var _a = SELECTCOLUMNS('Calendar',"Date",[Date])
return CALCULATE(SUM('Table'[Total Sales]),FILTER(ALL('Calendar'),[Date] in _a))
Output:
Best Regards,
Jianbo Li
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Ashley the measure is Current Month and is calculated this way:
and the measure for LAST_DATE_SALES is:
And what i want to do is to adjust my measure so that it can calculate the sales per year, month or day as selected
Starting December 3, join live sessions with database experts and the Fabric product team to learn just how easy it is to get started.
March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount! Early Bird pricing ends December 9th.
User | Count |
---|---|
26 | |
20 | |
19 | |
14 | |
13 |
User | Count |
---|---|
44 | |
36 | |
24 | |
24 | |
22 |