Forum Discussion
Anonymous
1 year agoNot applicable
Weightage based on unique value
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...
- 1 year ago
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] ) )
Poojara_D12
Super User
1 year agoHi Anonymous
- Go to the table in Power BI where your data resides.
- Click on the Modeling tab and select New Column.
- Use the following DAX formula:
Weightage =
VAR PortfolioID = [Portfolio]
VAR TotalNominalForPortfolio =
CALCULATE(
SUM('YourTable'[Nominal amount]),
ALLEXCEPT('YourTable', 'YourTable'[Portfolio])
)
RETURN
DIVIDE([Nominal amount], TotalNominalForPortfolio, 0)
- Example Output:
- Ensure the "Portfolio" and "Nominal amount" columns are correctly formatted and named.
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