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 am very new to Power BI. I try to do a conditional count for a category column, and here is my syntax. COURSE_MODALITY is the table, and GRADE_AWARDED is the column. I want to count number of grades in all those categories. I get this error message: too many arguements were passed to the RELATED function. The maximum argument count for the function is 1. How should I modify the syntax? Thanks!
DF Grades = COUNTAX(FILTER(COURSE_MODALITY,RELATED([GRADE_AWARDED] IN {"D","D+","D-","F","U"},)))
Solved! Go to Solution.
Hi @xliu1
DF Grades = calculate(COUNT(COURSE_MODALITY[GRADE_AWARDED]),COURSE_MODALITY[GRADE_AWARDED] IN {"D","D+","D-","F","U"})
Did I resolve your issue? Mark my post as a solution! Appreciate your Kudos, Press the thumbs up button!!
Regards,
Pranit
Hi @xliu1
DF Grades = calculate(COUNT(COURSE_MODALITY[GRADE_AWARDED]),COURSE_MODALITY[GRADE_AWARDED] IN {"D","D+","D-","F","U"})
Did I resolve your issue? Mark my post as a solution! Appreciate your Kudos, Press the thumbs up button!!
Regards,
Pranit
@xliu1 , try like
DF Grades = COUNTAX(FILTER(COURSE_MODALITY,RELATED([GRADE_AWARDED]) IN {"D","D+","D-","F","U"}))
or
DF Grades = countrows(FILTER(COURSE_MODALITY,RELATED([GRADE_AWARDED]) IN {"D","D+","D-","F","U"}))
Hi @amitchandak thanks for your prompt response. I tried both syntaxes. The first one still gives me the same error message. The 2nd one gives me the message: function RELATED expects a fully qualified column reference as its argument. Any idea? Thanks!
User | Count |
---|---|
58 | |
56 | |
55 | |
50 | |
32 |
User | Count |
---|---|
172 | |
89 | |
70 | |
46 | |
45 |