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

The ultimate Microsoft Fabric, Power BI, Azure AI & SQL learning event! Join us in Las Vegas from March 26-28, 2024. Use code MSCUST for a $100 discount. Register Now

Reply
Koushal
New Member

DAX formula to add values only if they are not present

Please can you help me with the DAX formula to identify values that are not already present? 

 

I am working with 3 tables Q1, Q2, and Report 

 

I have managed to take distinct customers from Q1 and Q2 and created a new table called Report and then I have added the balances of Q1 to the report.

 

Now I want to populate balances from Q2 only if balance from Q1 is not transferred and customer is 5 years +

 

The table structure for Q1 and Q2 is 

 

Customer Number

Number of years as a customer- 5 years and above, 3 and 5 years,

Balances - Points gathered

 

 

 

 

1 ACCEPTED SOLUTION
Fowmy
Super User
Super User

@Koushal 

Can you share some sample data with the desired output to have a clear understanding of your question? Mention whether you want a calculated column or measure
You can save your files in OneDrive, Google Drive, or any other cloud-sharing platform and share the link here.


Did I answer your question? Mark my post as a solution! and hit thumbs up


Subscribe and learn Power BI from these videos

Website LinkedIn PBI User Group

View solution in original post

4 REPLIES 4
Koushal
New Member

@Fowmy - sorry forgot to tag you

Fowmy
Super User
Super User

@Koushal 

Can you share some sample data with the desired output to have a clear understanding of your question? Mention whether you want a calculated column or measure
You can save your files in OneDrive, Google Drive, or any other cloud-sharing platform and share the link here.


Did I answer your question? Mark my post as a solution! and hit thumbs up


Subscribe and learn Power BI from these videos

Website LinkedIn PBI User Group

Table 1 

 

CUSTOMER ID BALANCE ClassificationPayment Status
12345     8,273.005 years Transferred
7836383     2,992.003 years Not eligible 
3823873838     3,933.002 years Not eligible 
293793739   33,332.004 YearsNot eligible 

 

 

Table 2 

 

CUSTOMER ID BALANCE ClassificationPayment Status
45736393  92,162,563.005 years Yet to transfer 
897828              890.003 yearsnot eligible 
928292         98,799.002 years not eligible 
29282           9,899.001 years not eligible 
12345              922.005 years not eligible 

 

Report 

- we need to update this table with the balance from Q2 only if the classification is "5 years" and the payment status is not "Transferred"

CUSTOMER ID BALANCE ClassificationPayment Status
12345           8,273.005 years Transferred
7836383   
3823873838   
293793739   
45736393   
897828   
928292   

@Koushal 

Not sure sure if you need the following output:

Create a new table with this code:

UNION(
	FILTER(
		 Table1 ,
		 Table1[Classification] = "5 Years" && Table1[Payment Status] = "Transferred"
	 ),
	
	FILTER(
		 Table2 ,
		 Table2[Classification] = "5 Years" && Table2[Payment Status] = "Transferred"
	 )	
)	

Fowmy_0-1633875099770.png

 



Did I answer your question? Mark my post as a solution! and hit thumbs up


Subscribe and learn Power BI from these videos

Website LinkedIn PBI User Group

Helpful resources

Announcements
Fabric Community Conference

Microsoft Fabric Community Conference

Join us at our first-ever Microsoft Fabric Community Conference, March 26-28, 2024 in Las Vegas with 100+ sessions by community experts and Microsoft engineering.

February 2024 Update Carousel

Power BI Monthly Update - February 2024

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

Fabric Career Hub

Microsoft Fabric Career Hub

Explore career paths and learn resources in Fabric.

Fabric Partner Community

Microsoft Fabric Partner Community

Engage with the Fabric engineering team, hear of product updates, business opportunities, and resources in the Fabric Partner Community.

Top Solution Authors