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

Exclude members from a table if doesn't have activity on another table

Hi everyone!

 

I'm having issues trying to figuring out how to solve this.  I have two fact tables, one with the advertiser activity (clicks, impressions, revenue) and another one with the advertiser budget.  Both tables are related to an advertiser and date dimensions.  The report is showing the advertiser performance along with its budget. The main issue is that I want to show only the data for advertiser with activity on the selected date range, and I don't want to show the budgets from advertiser with no activity on that range.  When I refer to no activity, I mean advertisers without at least one impression.

 

On the table visuals, I had success by filtering the sum of the impressions to be greater than 0.  But I'm not having success filtering on other visuals, like bar charts or gauges.  I'm currently using DirectQuery, and I've already tried to use the merge functionality, but the facts are too big to use that (millions of rows on the activity and at least 1 million on the budgets.  I don't want to create a view on the source database.  I've tried DAX without success.

 

I'm attaching a PBIX with an example, consider that the data is only representative, I have thousands of records per day for the activity.

 

https://1drv.ms/u/s!Ao4n4pOyN6L3gYFWqBbHy6tVbouuRw?e=R5szMd

 

Thanks in advance.

 

 

1 ACCEPTED SOLUTION
amitchandak
Super User
Super User

@Anonymous , Assuming table budget has a measure budget and activity ahs activity measure

 

sumx(Budget, if(isblank([activity]), blank(),[Budget]))

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

View solution in original post

3 REPLIES 3
amitchandak
Super User
Super User

@Anonymous , Assuming table budget has a measure budget and activity ahs activity measure

 

sumx(Budget, if(isblank([activity]), blank(),[Budget]))

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube
Anonymous
Not applicable

This worked fine, just found that my issue is related to the budgets.  The table has the budgets per day, and I was using the budget for the current day for an advertiser, for the whole month.  The problem is that some advertiser don't have activity all days, or at least the current day, so the budget is excluded.  As my time dimension has  a month year value I was thinking about creating something for the budgets per month, instead by year, but again, I don't want to create a view on the database.

Anonymous
Not applicable

Actually, disregard my previous comment.  I think I am closer to find a solution, using the idea from the formula that you gave me.  As I only want to get the budgets of the advertisers if they had activity on the selected date range, I've ended used the following DAX, the issue is that it works on a table, but the summarized value is wrong and also includes all budgets if add them to a gauge.

 

 

Budget = IF(SUMX(FILTER('Fact Activity', 'Fact Activity'[Advertiser Id] = [Advertiser Id]),[Revenue])>0,SUM('Fact Budget'[Last Monthly Budget]),BLANK())

 

As you can see, the values are filtered but the sum is wrong.  Compare the two last columns

mcastilloy2k_0-1603986370841.png

 

 

Helpful resources

Announcements
Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

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.