Check your eligibility for this 50% exam voucher offer and join us for free live learning sessions to get prepared for Exam DP-700.
Get StartedDon't miss out! 2025 Microsoft Fabric Community Conference, March 31 - April 2, Las Vegas, Nevada. Use code MSCUST for a $150 discount. Prices go up February 11th. Register now.
Hi All,
This is my requirement, help me on this. Whether we can achieve this in Power BI.
This is my data for example,
Code | Name | Description | Text | Amount |
1 | AAA | 120 | ||
1 | AAA | Descrip 1 | Text data 1 | 130 |
1 | AAA | Descrip 1 | 100 | |
2 | BBB | Text data 2 | 50 | |
2 | BBB | Descrip 2 | Text data 2 | 100 |
2 | BBB | Descrip 2 | 100 | |
2 | Descrip 2 | 50 |
And, the output,
Code | Name | Description | Text | Amount |
1 | AAA | Descrip 1 | Text data 1 | 350 |
2 | BBB | Descrip 2 | Text data 2 | 300 |
Solved! Go to Solution.
hello @UDMH
please check if this accomodate your need.
create new table with following DAX.
Summarize =
SUMMARIZE(
FILTER(
'Table',
'Table'[Description]<>BLANK()&&
'Table'[Text]<>BLANK()
),
'Table'[Code],
'Table'[Name],
'Table'[Description],
'Table'[Text],
"Amount",
CALCULATE(SUM('Table'[Amount]),ALLEXCEPT('Table','Table'[Code]))
)
Hope this will help.
Thank you.
Hi,
One of ways to create a new table is writing DAX formula something like below.
Please check the below picture and the attached pbix file.
expected result table =
SUMMARIZECOLUMNS(
Data[Code],
Data[Name],
Data[Description],
Data[Text],
FILTER(
Data,
Data[Name] <> BLANK() && Data[Description] <> BLANK() && Data[Text] <> BLANK()
),
"@Amount", CALCULATE(
SUM(Data[Amount]),
ALLEXCEPT(
Data,
Data[Code]
)
)
)
If this post helps, then please consider accepting it as the solution to help other members find it faster, and give a big thumbs up.
Hi @UDMH ,
You could try the below simple version using Dax:
NewTable =
SUMMARIZE(
'Table',
'Table'[Code],
"Name", MAX('Table'[Name]),
"Description", MAX('Table'[Description]),
"Text", MAX('Table'[Text]),
"Amount", SUM('Table'[Amount])
)
Also, you could use power query group by transformation. See images below:
Hope this helps!!
If this solved your problem, please accept it as a solution!!
Best Regards,
Shahariar Hafiz
Hi @UDMH ,
You could try the below simple version using Dax:
NewTable =
SUMMARIZE(
'Table',
'Table'[Code],
"Name", MAX('Table'[Name]),
"Description", MAX('Table'[Description]),
"Text", MAX('Table'[Text]),
"Amount", SUM('Table'[Amount])
)
Also, you could use power query group by transformation. See images below:
Hope this helps!!
If this solved your problem, please accept it as a solution!!
Best Regards,
Shahariar Hafiz
Hi,
One of ways to create a new table is writing DAX formula something like below.
Please check the below picture and the attached pbix file.
expected result table =
SUMMARIZECOLUMNS(
Data[Code],
Data[Name],
Data[Description],
Data[Text],
FILTER(
Data,
Data[Name] <> BLANK() && Data[Description] <> BLANK() && Data[Text] <> BLANK()
),
"@Amount", CALCULATE(
SUM(Data[Amount]),
ALLEXCEPT(
Data,
Data[Code]
)
)
)
If this post helps, then please consider accepting it as the solution to help other members find it faster, and give a big thumbs up.
Hello @UDMH ,
Here is the dax based on your data.
// I have created a sample table named Sample_Table with 4 columns Code_Name, Description, Text and Amount.
//You can make use of Summerize function to achieve the same.
hello @UDMH
please check if this accomodate your need.
create new table with following DAX.
Summarize =
SUMMARIZE(
FILTER(
'Table',
'Table'[Description]<>BLANK()&&
'Table'[Text]<>BLANK()
),
'Table'[Code],
'Table'[Name],
'Table'[Description],
'Table'[Text],
"Amount",
CALCULATE(SUM('Table'[Amount]),ALLEXCEPT('Table','Table'[Code]))
)
Hope this will help.
Thank you.
March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!
Check out the January 2025 Power BI update to learn about new features in Reporting, Modeling, and Data Connectivity.
User | Count |
---|---|
97 | |
65 | |
45 | |
39 | |
31 |
User | Count |
---|---|
164 | |
111 | |
61 | |
53 | |
38 |