March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount! Early bird discount ends December 31.
Register NowBe one of the first to start using Fabric Databases. View on-demand sessions with database experts and the Microsoft product team to learn just how easy it is to get started. Watch 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
March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!
Arun Ulag shares exciting details about the Microsoft Fabric Conference 2025, which will be held in Las Vegas, NV.
User | Count |
---|---|
114 | |
76 | |
57 | |
52 | |
44 |
User | Count |
---|---|
165 | |
116 | |
63 | |
57 | |
50 |