Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.

Reply
andrewmarston
Regular Visitor

Retirement Risk

Hi

 

I am doing some work on retirement risk and am trying to visualise something in PowerBI that I have previously done in Excel.

 

Basically all staff over 60 are grouped based on number of years to retirement at 65 (Now, 1 Year, 2 Years etc), the chart then visualises this as a bar chart with a cumulative total FTE for each bar.

 

In Excel I was able to do simple SUMIFS statement for each of the Groups to give the cumulative value and then plotted it onto the bar chart. 

 

I have not yet been able to do this in PowerBI.

 

I have tried to create cumulative columns for each group based on age but this doesn't work as I end up with 6 groupings of the same bar chart (albeit it is the right data in each of the charts) forumla below.

 

5 Years = CALCULATE(SUM('Retirement Risk'[FTE]),FILTER('Retirement Risk','Retirement Risk'[Retirement Risk] = "Now" || 'Retirement Risk'[Retirement Risk] = "1 Year"|| 'Retirement Risk'[Retirement Risk] = "2 Years"|| 'Retirement Risk'[Retirement Risk] = "3 Years"|| 'Retirement Risk'[Retirement Risk] = "4 Years"|| 'Retirement Risk'[Retirement Risk] = "5 Years"))

 

Any help would be appreciated.

 

1 REPLY 1
v-piga-msft
Resident Rockstar
Resident Rockstar

Hi @andrewmarston,


Basically all staff over 60 are grouped based on number of years to retirement at 65 (Now, 1 Year, 2 Years etc), the chart then visualises this as a bar chart with a cumulative total FTE for each bar.

 

In Excel I was able to do simple SUMIFS statement for each of the Groups to give the cumulative value and then plotted it onto the bar chart. 

 

I have not yet been able to do this in PowerBI.


If you want to get the cumulative value, you could have a reference of the formula below.

 

Measure =
CALCULATE (
    SUM ( 'Retirement Risk'[FTE] ),
    FILTER (
        ALL ( 'Retirement Risk' ),
        'Retirement Risk'[Retirement Risk] = MAX ( 'Retirement Risk'[Retirement Risk] )
            && 'Retirement Risk'[Date ] <= MAX ( 'Retirement Risk'[Date ] )
    )
)

And the output is below.

 

Capture2.PNG

 

If you need additional help please share some data sample and your expected output, so that we can help further investigate on it? You can upload it to OneDrive or Dropbox and post the link here. Do mask sensitive data before uploading.)

 

Best Regards,

Cherry

Community Support Team _ Cherry Gao
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Helpful resources

Announcements
LearnSurvey

Fabric certifications survey

Certification feedback opportunity for the community.

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.