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
Anonymous
Not applicable

How do multiple a variables in one data source, and one other in an other data source

Hello,

I wonder.. I have a parameter that i wanna mulitiple. with another parameter in anohter data set, how do I do that? 

 

Dataset1           Dataset2

a                      b

 

and the formua i want to have is: formula a=a*b*0.5

 

and i type that in in dataset1, by addanig a new colomn.

 

and i type : new colomn = dataset1[price]*0.5*dataset2[fees]

 

and I got this error: message  "a single value for colomn dataset2 cannot be determined. thi can happend when a measure fomula refers to a  colomn that cointasn many values withou specifytin an aggregation such min,max,count, sum to get a single result.


How do I do this???

1 ACCEPTED SOLUTION
v-kelly-msft
Community Support
Community Support

Hi @Anonymous ,

 

You may try a method below if  the two datasets dont have a relationship between:

First in both datasets,create an index column;

Then create a column as below:

Column = 'Table 1'[Value]*0.5*CALCULATE(MAX('Table 2'[Value]),FILTER('Table 2','Table 2'[Index]='Table 1'[Index]))

For details ,pls see attached.

 
Best Regards,
Kelly
Did I answer your question? Mark my post as a solution!

 

 

View solution in original post

4 REPLIES 4
v-kelly-msft
Community Support
Community Support

Hi @Anonymous ,

 

You may try a method below if  the two datasets dont have a relationship between:

First in both datasets,create an index column;

Then create a column as below:

Column = 'Table 1'[Value]*0.5*CALCULATE(MAX('Table 2'[Value]),FILTER('Table 2','Table 2'[Index]='Table 1'[Index]))

For details ,pls see attached.

 
Best Regards,
Kelly
Did I answer your question? Mark my post as a solution!

 

 

amitchandak
Super User
Super User

@Anonymous , how are you moving data from one table/dataset to another. The few ways are

//In dataset 1 from dataset 2

//when Dataset 1 and dataset 2 has Many to 1 reation

New colum dataset 1 = dataset1[price]*0.5* RELATED('dataset2'[Fee])

 

//In dataset 1 from dataset 2

//when Dataset 1 and dataset 2 has Many to 1 reation why giving a key column

Month Name = dataset1[price]*0.5*  LOOKUPVALUE('dataset2'['dataset2'[Fee],'dataset2'[key],'dataset1'[key])

 

 

//any direction just take care of filter join and aggeragtion - minx,maxx,xountx,sumx

New in dataset 1 =dataset1[price]*0.5*    maxx(FILTER(dataset2,dataset2[Id]=dataset1[Id]),'dataset2'[Fee])

pranit828
Community Champion
Community Champion

HI @Anonymous 

Determine how are these two tables joined and either create a DAX LOOKUPVALUE formula to get what you need.

https://docs.microsoft.com/en-us/dax/lookupvalue-function-dax





PBI_SuperUser_Rank@1x.png


Hope it resolves your issue? 
Did I answer your question? Mark my post as a solution!

Appreciate your Kudos, Press the thumbs up button!!
Linkedin Profile
CNENFRNL
Community Champion
Community Champion

I think it's necessary to establish a relationship between two datasets to achieve what you want.


Thanks to the great efforts by MS engineers to simplify syntax of DAX! Most beginners are SUCCESSFULLY MISLED to think that they could easily master DAX; but it turns out that the intricacy of the most frequently used RANKX() is still way beyond their comprehension!

DAX is simple, but NOT EASY!

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.