Advance your Data & AI career with 50 days of live learning, dataviz contests, hands-on challenges, study groups & certifications and more!
Get registeredGet Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Learn more
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
Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!
Check out the October 2025 Power BI update to learn about new features.
| User | Count |
|---|---|
| 84 | |
| 49 | |
| 38 | |
| 31 | |
| 30 |