The ultimate Fabric, Power BI, SQL, and AI community-led learning event. Save €200 with code FABCOMM.
Get registeredCompete to become Power BI Data Viz World Champion! First round ends August 18th. Get started.
Hello,
I'm calculating number of shipments pro depatment for the actual and last week.
At the beginning those calender weeks were hard coded
then I tried it with TODAY() but I've got problems with the report on every monday, cause I'm updating earliest on Tuesday and on Monday the measures switched to new calender week already without having the updated data
so now I tried a solution with to take MAX of Dates of my data to retrieve calender week, but for some data - I've got multiple departments - calender week 25 ist the max - and not 29 - as for the the whole data set - so I had to remove filters.
Somehow I can't manage to remove it.
I have a measure for the last week:
Hi @PatrycjaDz based on your inputs, it seems that part REMOVEFILTERS(Profitcenter[PC]) cause your "false" result in "another" place as this part of code literaly remove filters from Profitcenter.
Try following, even not tested as your dataset is not available
VAR _your_calculation_of_values_calendar=[my measure for calender week]
RETURN
CALCULATE( [Sendungsanzahl],
FILTER(Calender,Calender[KW]=_your_calculation_of_values_calendar),
Calender[Aktuelles Jahr Flag]=1
)
Did I answer your question? Mark my post as a solution! Kudos Appreciated!
Proud to be a Super User!
User | Count |
---|---|
15 | |
8 | |
6 | |
6 | |
5 |
User | Count |
---|---|
25 | |
13 | |
13 | |
8 | |
8 |