Power BI is turning 10! Tune in for a special live episode on July 24 with behind-the-scenes stories, product evolution highlights, and a sneak peek at what’s in store for the future.
Save the dateEnhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.
Hey there,
I have problems to solve the following task:
Ich have 2 Data Tables
1) --> TargetSalesPerDay for each Project
2) --> individual Project Start / End-Date
I managed to get the following result using this DAX:
Problem: With this solution I cannot aggregate targetSales to CalendarWeeks, Months, Years, ...
My TestDataset can be downloaded here: https://www.dropbox.com/scl/fo/3l9ea9yn9yuv9ouzesp1d/h?dl=0&rlkey=7iozb3d95q4g133lte4kznqb2
Solved! Go to Solution.
Solution: I worked it out with a vitual table:
Solution: I worked it out with a vitual table:
Hey @TomasAndersson ,
thank you very much so far. I really appreciate it. I got one step closer to the solution.
But your solution doesnt offer the right aggregation right now. My expectation for May 2022:
300 Sales per Day over 31 Days --> 9.300 Sales (to be shown in the visualization)
Hi!
Since there's no longer a unique value when using years etc. SELECTEDVALUE() might not work. You should be able to use the following instead (you might have to adjust to match your table and column names):
_TargetSales =
CALCULATE(sum('Table'[_TargetSalesPerDay]),
filter(ALLSELECTED(ProjectAppointment),
max('Dates'[Date])>=ProjectAppointment[Start] &&
max('Dates'[Date])<ProjectAppointment[End])
)
User | Count |
---|---|
25 | |
12 | |
8 | |
6 | |
6 |
User | Count |
---|---|
26 | |
12 | |
11 | |
10 | |
6 |