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.
Hi,
I'm trying to find an example of how to sum total sales for the current week.
My dataset includes a date field for each transaction in the format 22/10/2017.
Any ideas?
Solved! Go to Solution.
@wenners68,
Create a column using the DAX below in your table.
WeekNumber = WEEKNUM(Table[Date],2)
Then create a measure using the Dax below and check if you get expected result.
SalesforCurrentWeek= CALCULATE(SUM(Table[sale]),FILTER(Table,YEAR(Table[Date])=YEAR(NOW())&&WEEKNUM(NOW())=Table[WeekNumber]))
Regards,
Lydia
@wenners68,
Create a column using the DAX below in your table.
WeekNumber = WEEKNUM(Table[Date],2)
Then create a measure using the Dax below and check if you get expected result.
SalesforCurrentWeek= CALCULATE(SUM(Table[sale]),FILTER(Table,YEAR(Table[Date])=YEAR(NOW())&&WEEKNUM(NOW())=Table[WeekNumber]))
Regards,
Lydia
I used this same calculation for counting the number of dates, however, when adding to the table visual, it shows the same count across all jobs.
Is there a way to have each line calculate by job?
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 |
---|---|
114 | |
99 | |
82 | |
70 | |
60 |
User | Count |
---|---|
149 | |
114 | |
107 | |
89 | |
67 |