Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.
Register now!To celebrate FabCon Vienna, we are offering 50% off select exams. Ends October 3rd. Request your discount now.
Hi All,
Can you please help me with the below calculate function.
Table-1
Type | Country | Amount |
1 | US | 1705 |
2 | US | 1404 |
3 | US | 1629 |
4 | UK | 1325 |
5 | UK | 1048 |
1 | UK | 1936 |
2 | UK | 1481 |
3 | UK | 1428 |
Table - 2
Id | Product | Sub Prodcut |
1 | Loan | Car Loan |
2 | Loan | Personal Loan |
3 | Loan | Home Loan |
4 | Credit | Credit Loan |
5 | Credit | Credit Card due |
I need to show bar graph of the amount with country as legend. Product & sub-product as slicers.
If i select product as Loan output i should get is (9583/11956) and based on the country bar graph splits accordingly.
Solved! Go to Solution.
Hi @hiren89vora ,
I created a sample pbix file(see attachment) for you, please check whether that is what you want. You can create a measure as below:
Percent =
VAR _part =
SUM ( 'Table1'[Amount] )
VAR _all =
CALCULATE ( SUM ( 'Table1'[Amount] ), ALL ( 'Table1' ) )
RETURN
DIVIDE ( _part, _all, 0 )
If the above one can't help you get the desired result, please provide more sample data in your tables (exclude sensitive data) with Text format and your expected result with backend logic and special examples. It is better if you can share a simplified pbix file. You can refer the following link to upload the file to the community. Thank you.
How to upload PBI in Community
Best Regards
Hi @hiren89vora ,
I created a sample pbix file(see attachment) for you, please check whether that is what you want. You can create a measure as below:
Percent =
VAR _part =
SUM ( 'Table1'[Amount] )
VAR _all =
CALCULATE ( SUM ( 'Table1'[Amount] ), ALL ( 'Table1' ) )
RETURN
DIVIDE ( _part, _all, 0 )
If the above one can't help you get the desired result, please provide more sample data in your tables (exclude sensitive data) with Text format and your expected result with backend logic and special examples. It is better if you can share a simplified pbix file. You can refer the following link to upload the file to the community. Thank you.
How to upload PBI in Community
Best Regards
User | Count |
---|---|
98 | |
76 | |
74 | |
49 | |
26 |