Don't miss your chance to take the Fabric Data Engineer (DP-700) exam on us!
Learn moreThe FabCon + SQLCon recap series starts April 14th at 8am Pacific. If you’re tracking where AI is going inside Fabric, this first session is a can't miss. Register now
I have a table like the following one in which I use the earlier function to calculate the sum of each product, but now I have another table in which I have a percentage, and this value I need to multiply by each row of the sum column, how can I get That value being that I am already using the function earlier and such that it matches the Store and Product column?
sum = calculate (sum ('A' [price])) , FILTER ('A', [index] <= EARLIER ('A' [index]) && [store] = EARLIER ('A' [store]) ))
| index | Store | Year | Month | Product | price | sum |
| 1 | 1 | 2021 | 1 | A | 8000 | 8000 |
| 2 | 1 | 2021 | 2 | B | 1000 | 9000 |
| 3 | 1 | 2021 | 3 | C | 5000 | 14000 |
Other table
| Store | Product | Percentage |
| 1 | A | 0.9 |
| 1 | B | 0.5 |
| 1 | C | 0.3 |
Solved! Go to Solution.
Hi, @nicolasvc
You can try the following methods:
1. I have prepared tables a and B first. Sum is the calculation column.
2. Use the LOOKUPVALUE function to match the sum column of table A to table B.
Sum =
LOOKUPVALUE ( A[Sum], A[ Store], [Store], A[ Product], [ Product] )
3. The value you want is shown in the figure:
Value = B[Sum]*B[ Percentage]
If the method I provided above can't solve your problem, what's your expected result? Could you please provide more details for it?
Best Regards,
Charlotte Zhang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi, @nicolasvc
You can try the following methods:
1. I have prepared tables a and B first. Sum is the calculation column.
2. Use the LOOKUPVALUE function to match the sum column of table A to table B.
Sum =
LOOKUPVALUE ( A[Sum], A[ Store], [Store], A[ Product], [ Product] )
3. The value you want is shown in the figure:
Value = B[Sum]*B[ Percentage]
If the method I provided above can't solve your problem, what's your expected result? Could you please provide more details for it?
Best Regards,
Charlotte Zhang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
@nicolasvc , Use MAxx if needed
% = sumX (FILTER ('B', 'A'[index] <= ('B' [index]) && 'A'[store] = ('B' [store]) ), 'B' [Percentage])
or
% = MAXX(FILTER ('B', 'A'[index] <= ('B' [index]) && 'A'[store] = ('B' [store]) ), 'B' [Percentage])
refer 4 ways to copy data from one table to another
https://www.youtube.com/watch?v=Wu1mWxR23jU
https://www.youtube.com/watch?v=czNHt7UXIe8
If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.
A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.
Share feedback directly with Fabric product managers, participate in targeted research studies and influence the Fabric roadmap.
| User | Count |
|---|---|
| 53 | |
| 39 | |
| 37 | |
| 19 | |
| 18 |
| User | Count |
|---|---|
| 67 | |
| 66 | |
| 34 | |
| 32 | |
| 29 |