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

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

Reply
Anonymous
Not applicable

DAX measure for selecting rows based a filter

Hello guys, can you please help with a DAX measure to return rows where a value is 0.  I would like to create something like this below.

 

Capture.PNG

 

To those of you guys familiar with SQL, the synthax would be similar to

 

(select * from sciences where attendances = 0)

union all 

(select * from arts where attendances = 0)

 

 

Thanks in advance

1 ACCEPTED SOLUTION
Ashish_Mathur
Super User
Super User

Hi,

 

Append data from both tables.  Then build a visual by dragging the Subject column from the appended table and write this measure

 

=SUM(Data[Attendances])

 

Now filer on this measure with a criteria > 0.

 

Hope this helps.


Regards,
Ashish Mathur
http://www.ashishmathur.com
https://www.linkedin.com/in/excelenthusiasts/

View solution in original post

6 REPLIES 6
Ashish_Mathur
Super User
Super User

Hi,

 

Append data from both tables.  Then build a visual by dragging the Subject column from the appended table and write this measure

 

=SUM(Data[Attendances])

 

Now filer on this measure with a criteria > 0.

 

Hope this helps.


Regards,
Ashish Mathur
http://www.ashishmathur.com
https://www.linkedin.com/in/excelenthusiasts/
Zubair_Muhammad
Community Champion
Community Champion

@Anonymous

 

You can create a Calculated Table in Power BI

 

From the Modelling Tab>>>NEW TABLE

 

Table =
FILTER ( UNION ( Sciences, Arts ), [Attendances] = 0 )
Anonymous
Not applicable

thanks for your help, What's the DAX syntax for the measure [Attendances]?

Hi,

 

I am not sure of whom you are replying to but have you tried the SUM() function which i suggested in my previous post.


Regards,
Ashish Mathur
http://www.ashishmathur.com
https://www.linkedin.com/in/excelenthusiasts/
Anonymous
Not applicable

Thanks Ashish, I tried your method and it worked.. thanks alot. 

You are welcome.


Regards,
Ashish Mathur
http://www.ashishmathur.com
https://www.linkedin.com/in/excelenthusiasts/

Helpful resources

Announcements
FabCon Global Hackathon Carousel

FabCon Global Hackathon

Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes!

October Power BI Update Carousel

Power BI Monthly Update - October 2025

Check out the October 2025 Power BI update to learn about new features.

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.