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 dateEnhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.
Hi all,
I'm building up a rather complex measure but I'm getting a strange error thrown at me. Here's the beginning stage of my measure:
Solved! Go to Solution.
@Anonymous , If you need to group data by week level you don't need all except, because summarize id going to group it
Measure Draft = maxx(SUMMARIZE('Table', 'Table'[SERVICE_WEEK], "Max Date", max('Table'[SERVICE_DATE]), "Count Days", DISTINCTCOUNT('Table'[SERVICE_DATE])), [SERVICE_WEEK])
what is the benefit SUMMARIZE of MAX on service week? That is not using any inner measure
like, Sum the distinct day by week
Measure Draft = Sumx(SUMMARIZE('Table', 'Table'[SERVICE_WEEK], "Max Date", max('Table'[SERVICE_DATE]), "Count Days", DISTINCTCOUNT('Table'[SERVICE_DATE])), [Count Days])
@Anonymous, the ALLEXCEPT function removes the column SERVICE_WEEK, which makes it unavailable to SUMMARIZE. Try rewriting the SUMMARIZE portion like this:
ADDCOLUMNS (
SUMMARIZE ( 'Table', 'Table'[SERVICE_WEEK] ),
"Max Date", MAX ( 'Table'[SERVICE_DATE] ),
"Count Days", DISTINCTCOUNT ( 'Table'[SERVICE_DATE] )
)
Proud to be a Super User!
User | Count |
---|---|
25 | |
12 | |
8 | |
7 | |
7 |
User | Count |
---|---|
25 | |
12 | |
11 | |
10 | |
6 |