Microsoft Fabric Community Conference 2025, March 31 - April 2, Las Vegas, Nevada. Use code FABINSIDER for a $400 discount.
Register nowThe Power BI DataViz World Championships are on! With four chances to enter, you could win a spot in the LIVE Grand Finale in Las Vegas. Show off your skills.
Hi all, any advice in relation to the following problem would be greatly appreciated.
Background to problem:
I have a data table with portfolio ID column which there will be several customers under same portfolio ID. In my previous excel working I am using the nominal amount from each customer ID divided by the sum up the total nominal of each PFID for the weightage. How do I build a formula column in Power BI table that return the weightage amount based on each unique customer ID?
Example as below with the calculation I did in Excel:
Portfolio | Customer ID | Nominal amount | Weightage |
PFID55 | 1 | 600,000 | 0.705882 |
PFID60 | 2 | 200,000 | 0.117647 |
PFID60 | 3 | 100,000 | 0.058824 |
PFID55 | 4 | 100,000 | 0.117647 |
PFID60 | 5 | 500,000 | 0.294118 |
PFID55 | 6 | 150,000 | 0.176471 |
PFID60 | 7 | 300,000 | 0.176471 |
PFID56 | 8 | 300,000 | 0.75 |
PFID65 | 9 | 250,000 | 0.263158 |
PFID56 | 10 | 50,000 | 0.125 |
PFID57 | 11 | 200,000 | 0.285714 |
PFID60 | 12 | 100,000 | 0.058824 |
PFID56 | 13 | 50,000 | 0.125 |
PFID57 | 14 | 200,000 | 0.285714 |
PFID65 | 15 | 700,000 | 0.736842 |
PFID57 | 16 | 300,000 | 0.428571 |
PFID60 | 17 | 500,000 | 0.294118 |
Solved! Go to Solution.
Hi,
Please check the below picture and the attached pbix file.
It is for creating a calculated column.
Weightage CC =
VAR _portfolio = Data[Portfolio]
RETURN
DIVIDE (
Data[Nominal amount],
SUMX ( FILTER ( Data, Data[Portfolio] = _portfolio ), Data[Nominal amount] )
)
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 @keith515
Weightage =
VAR PortfolioID = [Portfolio]
VAR TotalNominalForPortfolio =
CALCULATE(
SUM('YourTable'[Nominal amount]),
ALLEXCEPT('YourTable', 'YourTable'[Portfolio])
)
RETURN
DIVIDE([Nominal amount], TotalNominalForPortfolio, 0)
Did I answer your question? Mark my post as a solution, this will help others!
If my response(s) assisted you in any way, don't forget to drop me a "Kudos" 🙂
Kind Regards,
Poojara
Data Analyst | MSBI Developer | Power BI Consultant
Consider Subscribing my YouTube for Beginners/Advance Concepts: https://youtube.com/@biconcepts?si=04iw9SYI2HN80HKS
Hi @keith515
We haven’t heard from you on the last response and was just checking back to see if you have a resolution yet.
In case if you have any resolution please do share that same with the community as it can be helpful to others.
Otherwise, will respond back with the more details and we will try to help.
Calculated column:
Weightage =
'Table'[Nominal amount] /
CALCULATE(
SUM('Table'[Nominal amount]),
ALLEXCEPT('Table', 'Table'[Portfolio])
)
💌 If this helped, a Kudos 👍 or Solution mark ✅ would be great! 🎉
Cheers,
Kedar
Connect on LinkedIn
Hi,
Please check the below picture and the attached pbix file.
It is for creating a calculated column.
Weightage CC =
VAR _portfolio = Data[Portfolio]
RETURN
DIVIDE (
Data[Nominal amount],
SUMX ( FILTER ( Data, Data[Portfolio] = _portfolio ), Data[Nominal amount] )
)
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.
March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!
Check out the February 2025 Power BI update to learn about new features.
User | Count |
---|---|
24 | |
12 | |
11 | |
10 | |
9 |
User | Count |
---|---|
18 | |
14 | |
14 | |
13 | |
12 |