The ultimate Microsoft Fabric, Power BI, Azure AI, and SQL learning event! Join us in Stockholm, Sweden from September 24-27, 2024.
2-for-1 sale on June 20 only!
Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and more. Get started
Hello,
I need to copy the % from another table to current table, can you help me to it.
Table 1 has value of 7 columns or 3 Columns, 2 Columns where are Table 2 has 7 columns, i just need to place the percentage from Table 1 to Table 2. I have used this DAX but didn't help.
Store Name-SH =
VAR _Domain =
CALCULATE(
FIRSTNONBLANK('04_StoreConsoDaily'[NewAdoption],1),
FILTER(ALL('04_StoreConsoDaily'),'04_StoreConsoDaily'[TxnDt]='CHeck'[TxnDt])
)
RETURN
IF(_Domain = BLANK(),0,_Domain)
Table 1:
StoreName | Store Num | TxnDt | Percentage |
Mayflower Basildon SF | 11 | 17-Mar | 10% |
Mayflower Basildon SF | 11 | 18-Mar | 10% |
Mayflower Basildon SF | 11 | 19-Mar | 10% |
Mayflower Basildon SF | 11 | 20-Mar | 10% |
Mayflower Basildon SF | 11 | 21-Mar | 10% |
Mayflower Basildon SF | 11 | 22-Mar | 10% |
Mayflower Basildon SF | 11 | 23-Mar | 10% |
Crownhill Plymouth SF | 112 | 17-Mar | 20% |
Crownhill Plymouth SF | 112 | 18-Mar | 20% |
Crownhill Plymouth SF | 112 | 19-Mar | 20% |
Crownhill Plymouth SF | 112 | 20-Mar | 20% |
Crownhill Plymouth SF | 112 | 21-Mar | 30% |
Leigh SF | 113 | 17-Mar | 20% |
Leigh SF | 113 | 18-Mar | 20% |
Leigh SF | 113 | 19-Mar | 30% |
Leigh SF | 113 | 20-Mar | 40% |
Table 2:
StoreName | Store Num | TxnDt |
Mayflower Basildon SF | 11 | 17-Mar |
Mayflower Basildon SF | 11 | 18-Mar |
Mayflower Basildon SF | 11 | 19-Mar |
Mayflower Basildon SF | 11 | 20-Mar |
Mayflower Basildon SF | 11 | 21-Mar |
Mayflower Basildon SF | 11 | 22-Mar |
Mayflower Basildon SF | 11 | 23-Mar |
Crownhill Plymouth SF | 112 | 17-Mar |
Crownhill Plymouth SF | 112 | 18-Mar |
Crownhill Plymouth SF | 112 | 19-Mar |
Crownhill Plymouth SF | 112 | 20-Mar |
Crownhill Plymouth SF | 112 | 21-Mar |
Crownhill Plymouth SF | 112 | 22-Mar |
Crownhill Plymouth SF | 112 | 23-Mar |
Expected Result:
StoreName | Store Num | TxnDt | Percentage |
Mayflower Basildon SF | 11 | 17-Mar | 10% |
Mayflower Basildon SF | 11 | 18-Mar | 10% |
Mayflower Basildon SF | 11 | 19-Mar | 10% |
Mayflower Basildon SF | 11 | 20-Mar | 10% |
Mayflower Basildon SF | 11 | 21-Mar | 10% |
Mayflower Basildon SF | 11 | 22-Mar | 10% |
Mayflower Basildon SF | 11 | 23-Mar | 10% |
Crownhill Plymouth SF | 112 | 17-Mar | 20% |
Crownhill Plymouth SF | 112 | 18-Mar | 20% |
Crownhill Plymouth SF | 112 | 19-Mar | 20% |
Crownhill Plymouth SF | 112 | 20-Mar | 20% |
Crownhill Plymouth SF | 112 | 21-Mar | 0% |
Crownhill Plymouth SF | 112 | 22-Mar | 0% |
Crownhill Plymouth SF | 112 | 23-Mar | 0% |
Leigh SF | 113 | 17-Mar | 20% |
Leigh SF | 113 | 18-Mar | 20% |
Leigh SF | 113 | 19-Mar | 30% |
Leigh SF | 113 | 20-Mar | 0% |
Leigh SF | 113 | 21-Mar | 0% |
Leigh SF | 113 | 22-Mar | 0% |
Leigh SF | 113 | 23-Mar | 0% |
Solved! Go to Solution.
Hi @TomMartens
Sorry, all my Gmail, One Drive, Dropbox or any other applications are restricted here. I don't have provisions to sign in to any of the applications.
As i updated in the 1st chat, is there any possible that can be done here.
Hey @Krishna_Newuser ,
I recommend using the DAX function LOOKUPVALUE to create a calculated column in Table2. This article explain the intricate workings of the function: https://dax.guide/lookupvalue/
Regards,
Tom
Hi @TomMartens
Thank you for the reply.
I tried this one,
Store Name-SH =
VAR _Sample = SAMPLE(10, '04_StoreConsoDaily', '04_StoreConsoDaily'[StoreNo])
RETURN
ADDCOLUMNS(
SUMMARIZE(_Sample, '04_StoreConsoDaily'[TxnDt], '04_StoreConsoDaily'[NewAdoption]),
"New Adoption",
VAR TxnDt = '04_StoreConsoDaily'[TxnDt]
VAR RefrenceYear = 2024
Var _CheckTxnDt =
LOOKUPVALUE(CHeck[TxnDt], CHeck[StoreNo], CHeck[TxnDt], 0)
RETURN
_CheckTxnDt)
Error received as "The expression refers to multiple columns. Multiple columns cannot be converted to a scalar value".
Hey @Krishna_Newuser ,
consider creating a pbix that contains sample data. Upload the pbix to OneDrive, Google Drive, or dropbox and share the link. If you are using Excel to create the sample data instead of the manual input method share the spreadsheet as well.
Regards,
Tom
Hi @TomMartens
Sorry, all my Gmail, One Drive, Dropbox or any other applications are restricted here. I don't have provisions to sign in to any of the applications.
As i updated in the 1st chat, is there any possible that can be done here.
Join the community in Stockholm for expert Microsoft Fabric learning including a very exciting keynote from Arun Ulag, Corporate Vice President, Azure Data.
Check out the June 2024 Power BI update to learn about new features.
User | Count |
---|---|
95 | |
94 | |
85 | |
69 | |
65 |
User | Count |
---|---|
241 | |
124 | |
121 | |
81 | |
79 |