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, need help with a DAX Query I want to retune which week(s) the max hours occurs not all weeks for each course?
Solved! Go to Solution.
or you plot the course column with two measures like:
_WeekMax = MAX(data[WeekMax])
_WeekNo =
MAXX(
TOPN(
1,
data,
data[WeekMax]
),
data[WeekNo]
)
it worked like:
Thanks, it is common thet the max week occurs more then once, is there a war to expemf to reuurm them all
i.e. Course A may have a max hours in week 3,7 and week 10.
Hi, Thanks, nearly right
It is returning the hours for the max week, but it is returning the last (Max) value for Week No. and not the weeks this values occur on i,e, the first course has 30 weeks of data, so it is returning 30 and not weeks 11, 12, 14 14 & 15
hi @Garbo62
not sure if i fully get you, supposing you have a data table like:
try to create a calculated table like:
Table =
ADDCOLUMNS(
ADDCOLUMNS(
VALUES(data[course]),
"WeekMax",
CALCULATE(MAX(data[WeekMax]))
),
"WeekNo",
CALCULATE(MAX(data[WeekNo]))
)
it worked like:
or you plot the course column with two measures like:
_WeekMax = MAX(data[WeekMax])
_WeekNo =
MAXX(
TOPN(
1,
data,
data[WeekMax]
),
data[WeekNo]
)
it worked like:
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 |