Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
Abishek
Helper I
Helper I

if blank get all student Id if not bank display corresponding student id from student group table.

Hi all,
I need to get all student_id from student table if student_group_id in school table is blank.
If not blank i need all the student_id corresponding to student_group_id form student group table.
The problem with my formula is the in retrieving all the student id. This is not working as expected.

FINAL_TABLE = 
SUMMARIZE(SCHOOL,
    SCHOOL[SCHOOL_ID] ,
    SCHOOL[STUDENTGROUP_ID],
"STUDENT_ID",
    UNION(
        SELECTCOLUMNS(
            FILTER(SCHOOL,
            ISBLANK(SCHOOL[STUDENTGROUP_ID])),
            "STUDENT_ID", VALUES(STUDENT[STUDENT_ID]) 
        ),
        SELECTCOLUMNS(
            FILTER(SCHOOL,
            NOT(ISBLANK(SCHOOL[STUDENTGROUP_ID]))),
            "STUDENT_ID",  LOOKUPVALUE(STUDENTGROUP[STUDENT_ID] , 
            STUDENTGROUP[STUDENTGROUP_ID] , SCHOOL[STUDENTGROUP_ID])
        )
    )
)


THIS IS NOT WORKING AS EXPECTED.

 SELECTCOLUMNS(
            FILTER(SCHOOL,
            ISBLANK(SCHOOL[STUDENTGROUP_ID])),
            "STUDENT_ID", VALUES(STUDENT[STUDENT_ID]) 
        ),


Can someone help me to resolve this issue.
Tanks in advance.

 

1 REPLY 1
v-zhangti
Community Support
Community Support

Hi, @Abishek 

 

Can you provide sample data for testing? Sensitive information can be removed in advance. What kind of expected results do you expect? You can also show it with pictures or Excel. I look forward to your response.

 

Best Regards,

Community Support Team _Charlotte

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

December 2025 Power BI Update Carousel

Power BI Monthly Update - December 2025

Check out the December 2025 Power BI Holiday Recap!

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.