The ultimate Fabric, Power BI, SQL, and AI community-led learning event. Save €200 with code FABCOMM.
Get registeredEnhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends September 15. Request your voucher.
I have week no column and Termination year column and Tour Request no column and Qt Exclude Flag column in a table in power bi desktop. I have a week column from 1 to 52 week numbers. I want to show the distinct count of Tour Request no of Every week of Termination Year Current year and Qt Exclude Flag '0' individually up to current week in the line chart .and the Current week to Past 6 weeks count should be Dynamically change weekly when I refresh the report
Like this. for example my currentweek is 48, the linechart should show the current week and Last 6 weeks Data for individual weeks.
Hi,
I am not sure how your semantic model looks like, but I tried to create a sample pbix file like below.
Please check the below picture and the attached pbix file, and try using WINDOW DAX function.
WINDOW function (DAX) - DAX | Microsoft Learn
Quantity last 6 weeks: =
VAR _t =
FILTER (
ALL ( 'Calendar'[WeekStartDate], 'Calendar'[Year-Week] ),
[Quantity:] <> BLANK ()
)
RETURN
CALCULATE (
[Quantity:],
KEEPFILTERS (
WINDOW ( 1, ABS, 6, ABS, _t, ORDERBY ( 'Calendar'[WeekStartDate], DESC ) )
)
)
My Data Model is look like this..
I want To show Only Current Week to Past 5 weeks Count data in this visual and dynamically the current week number should be change weekly when dataset is refreshed
User | Count |
---|---|
15 | |
13 | |
8 | |
6 | |
6 |
User | Count |
---|---|
24 | |
19 | |
12 | |
9 | |
7 |