Forum Discussion
Fali324
1 year agoHelper II
Percentage Calculation
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 percentag...
- 1 year ago
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.
Fali324
1 year agoHelper II
Hi,
that doesn't work as all the sectors in a stacked graph show as 100%, any idea why that would happen?
- MichaelSamiotis1 year agoResolver I
The issue might be because of the Stacked Column Chart.
- Insert a Stacked Column Chart.
- Add the following fields:
- X-Axis: FY => FQ (drag both to create a hierarchy for drill-down).
- Legend: Sector (the breakdown by sector).
- Values: PercentageContribution (this measure makes sure that the correct percentage is calculated).
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.