Forum Discussion
Xavius
1 year agoFrequent Visitor
Last week sales issue
Hi all, the measure below Sales last week = CALCULATE( SUM( Table[sales] ), REMOVEFILTERS( table ), table[week] = MAX( table[week] ) - 1 ) will work but if put Region column it will be repeted ...
- 1 year ago
hi Xavius
REMOVEFILTERS removes filters from a column or table. So, when you remove filters from a table, it's expected that the measure returns the same value for all rows - regardless of what columns are added to the visual - except for the column directly referenced in the measure. It’s best practice to use a dedicated dates/calendar table so that filter modifiers apply only to that table and don’t unintentionally affect the entire fact table.
Revenue LW = CALCULATE ( [Total Revenue], FILTER ( ALL ( Dates ), Dates[Week Num] = MAX ( Dates[Week Num] ) - 1 ) )Please refer to the attached pbix.
Ashish_Mathur
1 year agoSuper User
Hi,
Ensure that there is a Calendar table with a week number column. Once that is in place, share the download link of the PBI file.