Forum Discussion
Row context not overriding in calculate function
- 6 years ago
Hi Parvinder, Ken,
I have solved my problem, It was similar to this problem here https://www.sqlbi.com/daxpuzzle/unexpected-filter-behavior-in-calculate/ and I sorted it by adding an explicit all to the calculate function for the attainment index column I was using to sort the attainment:
CALCULATE([Pupil Count],Sheet1[Attainment]<>"No Data",ALL(Sheet1[Attainment_Index]))Thanks for your time.
Hi Ken,
I've been watching (and rewatching) the Advanced DAX video from the SQL BI guys this afternoon. I couldn't get the syntax you suggested to work, the all function wouldn't accept Pupil Count as an argument, maybe it wasn't clear it was a measure rather than a column. I have tried incorporating All into that formula without success, I think I just passed ALL(Sheet1) as the second argument in CALCULATE but it had the same result.
I feel you.
Could you provide a small set of sample data.
You can just copy and paste into one of these replies from power bi or excel.
That may let me give you more specific advice.
Thanks
Ken
- parry2k6 years ago
Super User
bobby27 something obvious is missing, share pbix file wiht sample data, remove sensitive info before sharing. you can also send it by email, my email is in the signature.
- bobby276 years agoFrequent Visitor
Hi Parvinder, Ken,
I have solved my problem, It was similar to this problem here https://www.sqlbi.com/daxpuzzle/unexpected-filter-behavior-in-calculate/ and I sorted it by adding an explicit all to the calculate function for the attainment index column I was using to sort the attainment:
CALCULATE([Pupil Count],Sheet1[Attainment]<>"No Data",ALL(Sheet1[Attainment_Index]))Thanks for your time.