Join us for an expert-led overview of the tools and concepts you'll need to pass exam PL-300. The first session starts on June 11th. See you there!
Get registeredPower BI is turning 10! Let’s celebrate together with dataviz contests, interactive sessions, and giveaways. Register now.
Hi , i am trying to add to my transaction table , the price from the price list.
transactiontbl:
Customer, Date, Amount
PriceListtbl:
[From Date],[To Date],[Customer],[Price]
please help me, to add the price to transactiontbl
Solved! Go to Solution.
@Anonymous
Implement the below DAX and let me know if this is what you're looking for?
Create a new column applying the below DAX.
Price=
CALCULATE( AVERAGE( PriceListtbl[Price] ),
FILTER( PriceListtbl,
PriceListtbl[FromDate] <= ( transactiontbl[Date] )
&& PriceListtbl[ToDate] >= ( transactiontbl[Date] )
&& PriceListtbl[Customer] = ( transactiontbl[Customer] )
)
)
Then taking it a step further to work out the Amount * Price per Customer, ignoring the date (although the Price is reflected by Date period in the first calculation) - see below:
Create a new table apply the below DAX:
tPRICE =
GROUPBY( transactiontbl, transactiontbl[Customer],
"PRICEPRICE", SUMX( CURRENTGROUP(), transactiontbl[cPrice] * transactiontbl[Amount] )
)
Note: you can rename the column/table to anything you want.
@Anonymous
Implement the below DAX and let me know if this is what you're looking for?
Create a new column applying the below DAX.
Price=
CALCULATE( AVERAGE( PriceListtbl[Price] ),
FILTER( PriceListtbl,
PriceListtbl[FromDate] <= ( transactiontbl[Date] )
&& PriceListtbl[ToDate] >= ( transactiontbl[Date] )
&& PriceListtbl[Customer] = ( transactiontbl[Customer] )
)
)
Then taking it a step further to work out the Amount * Price per Customer, ignoring the date (although the Price is reflected by Date period in the first calculation) - see below:
Create a new table apply the below DAX:
tPRICE =
GROUPBY( transactiontbl, transactiontbl[Customer],
"PRICEPRICE", SUMX( CURRENTGROUP(), transactiontbl[cPrice] * transactiontbl[Amount] )
)
Note: you can rename the column/table to anything you want.
Thank you,
Is there an option to do it in power query?
This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.
Check out the June 2025 Power BI update to learn about new features.
User | Count |
---|---|
83 | |
75 | |
64 | |
39 | |
34 |
User | Count |
---|---|
107 | |
56 | |
52 | |
48 | |
40 |