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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

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
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.