Forum Discussion
Anonymous
6 years agoNot applicable
Issue with Bar chart: SummarizeColumns() and AddMissingItems() may not be used in this context
Hi All, I am seeing an issue with a bar chart when I use a calculated measure that includes "Summarizecolumns()" . This measure is working fine with a card visual but when I use this on any other...
- 6 years ago
It's probably becuase the Location column is in both the visual and the SUMMARIZECOLUMNS(). When SUMMARIZECOLUMNS() throws an error, I sometimes use its less error prone predecessor ADDCOLUMNS(SUMMARIZE(). Here is that version of your measure:
Count_Over40 =
VAR tablex =
FILTER (
ADDCOLUMNS (
SUMMARIZE (
'Timecard Swipes',
'Date'[WeekNum_Year],
'Timecard Swipes'[Employee_ID],
'Timecard Swipes'[Location]
),
"XXHours", CALCULATE ( SUM ( 'Timecard Swipes'[Work_Hours] ) )
),
[XXHours] > 40
)
RETURN
CALCULATE ( COUNTROWS ( tablex ) ) + 0If this works for you, please mark it as the solution. Kudos are appreciated too. Please let me know if not.
Regards,
Pat
Anonymous
6 years agoNot applicable
here is the link to download the file.
https://drive.google.com/file/d/1v9zeFsyJ6ovTKpF8OEZ-tzWRquH_5NMa/view?usp=sharing