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!The Power BI Data Visualization World Championships is back! It's time to submit your entry. Live now!
Hi
I have two tables,
Fee Date -
Date
Sector
New Fee
Financial Year
Date
FY
FQ
I've linked both the table using the date column and want to create a graph which shows the percentage contribution for each sector. I have a hierachy of FY & FQ so if I'm at the highest level it will show overall distibution for the whole FY but if I drill down to FQ it should show the contribution based on the quaters.
How can I achieive this?
Here is my sample data and Percentage Contribution is what I want to achieve, I've based it on quaters for an example
| FY | FQ | Date - Copy | Sector | New Fee | Year Total | Percentage Contribution |
| 2024 | Q1 | 01/04/2024 00:00 | Sector 1 | £821,000.00 | £ 27,270,000 | 3% |
| 2024 | Q1 | 01/04/2024 00:00 | Sector 2 | £5,372,000.00 | £ 27,270,000 | 20% |
| 2024 | Q1 | 01/04/2024 00:00 | Sector 3 | £269,000.00 | £ 27,270,000 | 1% |
| 2024 | Q2 | 01/07/2024 00:00 | Sector 1 | £804,000.00 | £ 27,270,000 | 3% |
| 2024 | Q2 | 01/07/2024 00:00 | Sector 2 | £5,336,000.00 | £ 27,270,000 | 20% |
| 2024 | Q2 | 01/07/2024 00:00 | Sector 3 | £244,000.00 | £ 27,270,000 | 1% |
| 2024 | Q3 | 01/10/2024 00:00 | Sector 1 | £788,000.00 | £ 27,270,000 | 3% |
| 2024 | Q3 | 01/10/2024 00:00 | Sector 2 | £5,802,000.00 | £ 27,270,000 | 21% |
| 2024 | Q3 | 01/10/2024 00:00 | Sector 3 | £340,000.00 | £ 27,270,000 | 1% |
| 2024 | Q4 | 01/01/2025 00:00 | Sector 1 | £795,000.00 | £ 27,270,000 | 3% |
| 2024 | Q4 | 01/01/2025 00:00 | Sector 2 | £5,484,000.00 | £ 27,270,000 | 20% |
| 2024 | Q4 | 01/01/2025 00:00 | Sector 3 | £601,000.00 | £ 27,270,000 | 2% |
| 2024 | Q4 | 01/01/2025 00:00 | Sector 4 | £614,000.00 | £ 27,270,000 | 2% |
Solved! Go to Solution.
Hi @Fali324
Assuming that for FY level, the contribution is based on the year total over the total of all years and sectors, try this:
Contribution% =
VAR _FQ =
DIVIDE (
SUM ( 'DataTable'[New Fee] ),
CALCULATE (
SUM ( 'DataTable'[New Fee] ),
ALL ( FYFQ[FQ] ),
ALL ( 'DataTable'[Sector] )
)
)
VAR _FY =
DIVIDE (
SUM ( 'DataTable'[New Fee] ),
CALCULATE (
SUM ( 'DataTable'[New Fee] ),
ALL ( FYFQ[FY] ),
ALL ( 'DataTable'[Sector] )
)
)
RETURN
IF ( ISINSCOPE ( FYFQ[FQ] ), _FQ, _FY )
Otherwise, please provide the expected result for the year level and the reasoning behind.
Please see the attached pbix.
Hi @Fali324
Assuming that for FY level, the contribution is based on the year total over the total of all years and sectors, try this:
Contribution% =
VAR _FQ =
DIVIDE (
SUM ( 'DataTable'[New Fee] ),
CALCULATE (
SUM ( 'DataTable'[New Fee] ),
ALL ( FYFQ[FQ] ),
ALL ( 'DataTable'[Sector] )
)
)
VAR _FY =
DIVIDE (
SUM ( 'DataTable'[New Fee] ),
CALCULATE (
SUM ( 'DataTable'[New Fee] ),
ALL ( FYFQ[FY] ),
ALL ( 'DataTable'[Sector] )
)
)
RETURN
IF ( ISINSCOPE ( FYFQ[FQ] ), _FQ, _FY )
Otherwise, please provide the expected result for the year level and the reasoning behind.
Please see the attached pbix.
Hi,
that doesn't work as all the sectors in a stacked graph show as 100%, any idea why that would happen?
The issue might be because of the Stacked Column Chart.
Please let me know if that works. If so please mark this as a solution so otheres can benefit too.
✅Please let me know if that works. If so please mark this as a solution so otheres can benefit too.
Hi @Fali324 ,
I would calculate 3 measures to do that.
TotalNewFee =
SUM('Fee Date'[New Fee])
TotalFeeByPeriod =
CALCULATE(
SUM('Fee Date'[New Fee]),
ALLSELECTED('Fee Date'[Sector]) // Keeps context for other filters while ignoring Sector
)
PercentageContribution =
DIVIDE(
[TotalNewFee],
[TotalFeeByPeriod],
0
)
✅ Please let me know if that works. If so please mark this as a solution so otheres can benefit too.
The Power BI Data Visualization World Championships is back! It's time to submit your entry.
Check out the January 2026 Power BI update to learn about new features.
| User | Count |
|---|---|
| 60 | |
| 47 | |
| 39 | |
| 24 | |
| 23 |
| User | Count |
|---|---|
| 144 | |
| 106 | |
| 63 | |
| 38 | |
| 31 |