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

Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now

Reply
s213bell
New Member

Need Help with DAX if statment

Hello,

 

I just started using power BI and was wondering if I could get some help.

 

I have 3 tables, Current customers, Our Historic List and a third table that needs to be filled.

 

The third table will look at the id in the current table, see if it is in the historic table and if not add that id to the third table.

New customer = if('Current'[ID] = RELATED('Historic'[id]),nothing,'current'[student id number])
 
First off I am not sure if this is the right way to do it. Basically I want it to count all the new ID's and give us a list.
 
But it also says it can't even find the ID column in the current table and I checked the spelling. Any suggestions would be appreciated.
 
Thank you
 

 

1 ACCEPTED SOLUTION
Anonymous
Not applicable

@s213bell 

create a calculated column in current customers table to identify id present in historic customers table.

present historic id = LOOKUPVALUE(Historic List[Customer ID historic],Historic List[Customer ID historic],Current customers[Customer ID current])
This above dax will give you a column that displays customer id present in historic customer table and new customer id as blank.
Then create a measure to count blank rows as follows,
COUNTBLANK(Current customers[present historic id])
Total blank rows in column 'present historic id' will give you total no.of. new customer ids.
 
If this post helps you to resolve your problem, then mark it as 'Accept as solution' below.

View solution in original post

4 REPLIES 4
Anonymous
Not applicable

Post some sample data for clear understanding

@Anonymous 

Hello,

 

So I have a table with a column Customer ID for our historic list like below

Customer ID Historic
1
2
3
4
5
6
7

8

 

Then we have say the weekly report that has the same column

Customer ID Current
5
2
9
65
2

 

I want to take this column from this table and say if the id in this table is also in the Historic table customer ID ignore.  If not print that ID in the third table.  This is so we can count all the new id's for that month.  Let me know if you need any more information

Anonymous
Not applicable

@s213bell 

create a calculated column in current customers table to identify id present in historic customers table.

present historic id = LOOKUPVALUE(Historic List[Customer ID historic],Historic List[Customer ID historic],Current customers[Customer ID current])
This above dax will give you a column that displays customer id present in historic customer table and new customer id as blank.
Then create a measure to count blank rows as follows,
COUNTBLANK(Current customers[present historic id])
Total blank rows in column 'present historic id' will give you total no.of. new customer ids.
 
If this post helps you to resolve your problem, then mark it as 'Accept as solution' below.

Thank you so much that helped.

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.

Top Solution Authors