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

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

Reply
procyon82
Resolver I
Resolver I

Query acting as an AND

I have a query that gets sessions from Google analytics. The data goes back a few years.

We recently turned on demographics data in Google Analytics. If I now include demographics data in my query it acts as a filter and will only show me sessions data when there is data for demographics. Is there a way to make demographics data optional in the query? I.e. Get me all data even if certain rows don't have values for certain columns. 

My current workaround is to have two separate queries, but I was wondering if there is a way to get all data in a single query.

Thanks!

1 REPLY 1
CahabaData
Memorable Member
Memorable Member

It really comes down to this phrase: " include demographics data in my query "

 

If this demographic data is in a separate table - then your join line is going to act like an AND in its default state of an inner join (where the join must match a value in both tables) - and you would need to option it to be an outer join where ALL data regardless of demographies....which should result in null/blanks for your records without demographies...

 

On the otherhand if it is not a separate table involving a join - then I'm not sure what is your query design as you should be able to add just another field of a single table without a problem.

 

 

www.CahabaData.com

Helpful resources

Announcements
September Power BI Update Carousel

Power BI Monthly Update - September 2025

Check out the September 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.

Top Solution Authors