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 dateJoin us for an expert-led overview of the tools and concepts you'll need to become a Certified Power BI Data Analyst and pass exam PL-300. Register now.
Hi all, i have week date filter , if i select one date (current week date) and previous week date is prior week date that should be populated in table visual and i need difference of both dynamically .i need like that for every dynamic selection of week date
Excepted output
plz help me out . plz
Solved! Go to Solution.
Hi,
I am not sure how your datamodel looks like, but I tried to create a sample pbix file like below.
Please check the below picture and the attached pbix file.
Usage prior week: =
CALCULATE (
[Usage current week:],
OFFSET ( -1, ALL ( 'Calendar'[Year-Wk sort], 'Calendar'[Year-Wk] ) )
)
try like:
UsageCurrentWeek =
VAR _date = MAX(TableName[week date])
SUMX(
FILTER(TableName, TableName[week date] = _date ),
TableName[usage value]
)
UsagePriorWeek =
VAR _date = MAX(TableName[week date])
SUMX(
FILTER(TableName, WEEKNUM(TableName[week date]) = WEEKNUM(_date) -1 ),
TableName[usage value]
)
difference = UsageCurrentWeek - UsagePriorWeek
Hi,
I am not sure how your datamodel looks like, but I tried to create a sample pbix file like below.
Please check the below picture and the attached pbix file.
Usage prior week: =
CALCULATE (
[Usage current week:],
OFFSET ( -1, ALL ( 'Calendar'[Year-Wk sort], 'Calendar'[Year-Wk] ) )
)
@sarath_chandra Hi! Here is the measure to calculate dinamically the Difference:
Thanks@BeaBF ,you added PN, usage measure ,difference,date in columns ... but i dont need date ( i need usage for selected week ,usage for past week of selected week date as columns) can you please alter the dax ? please
great thanks for your support
Check out the July 2025 Power BI update to learn about new features.
This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.
User | Count |
---|---|
23 | |
11 | |
10 | |
9 | |
8 |