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

Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Learn more

Reply
Nihed
Helper III
Helper III

Calculation on dax (Urgent)

Hello,

Who can help me on this urgent subject please,

 

I have a table that contains the following data on power BI

Nihed_0-1668689755987.png

 

my request is :

Calculate each Employee Group’s Headcount change per year as a percentage comparing to prev year.

how I can do this calculation on dax for final objective to make this visual?

Nihed_0-1668690258011.png

 

 

 

1 ACCEPTED SOLUTION
daXtreme
Solution Sage
Solution Sage

12 REPLIES 12
daXtreme
Solution Sage
Solution Sage

File attached

@daXtreme  I’m really happy it works super well thank you very much🙂

BeaBF
Super User
Super User

@Nihed Hi! Can you paste some sample data?

 

BBF

I share with you an example for my data

 

Calendar yearHeadcountEmployee GroupDirectorate
201310TemporarySGE
201313OfficialEXD
201712OfficialCTP
201710OfficialDAF
201713TemporaryEDU
201411OfficialEDU
201410TemporaryEDU
201510OfficialNEA
201613OfficialEXD
201615TemporaryEDU
201710OfficialEDU
201711OfficialELS
201710OfficialGOV
201812TemporaryGOV
201810OfficialNEA
201910TemporaryCFE
201912OfficialEXD
202010TemporaryGOV
202011OfficialGOV
202010OfficialGOV
202111OfficialEXD
202115OfficialCTP
202111OfficialSTI
202210OfficialEXD
202211OfficialEXD
202211Associated staffCTP
202215OfficialCTP
202214OfficialCTP
202213TemporaryEDU

 

@Nihed can you paste a table with the expected results? I can't understand how you obtain 12,5% for example in the first chart for 2013.

 

BBF

I share with you the link to download the correct file:

 

https://we.tl/t-6g3kvoLsad 

@Nihed Access is denied. Try this measures:

MEDIA = CALCULATE(MEDIAN('Table'[Headcount]), ALLEXCEPT('Table','Table'[Calendar year],'Table'[Employee Group]))
 
PREVYEAR =
VAR YYEAR = SELECTEDVALUE('Table'[Calendar year])
VAR PREVYEAR = YYEAR - 1
RETURN CALCULATE([MEDIA],'Table'[Calendar year] = YYEAR) - CALCULATE([MEDIA],'Table'[Calendar year] = PREVYEAR)
 
BBF

It doesn’t work I have the Media measurement equal 0

@Nihed Try to attack here your pbix file 

 

BeaBF_0-1668702336806.png

 

how I can do it I don’t know how,if you can do it yourself I’d be grateful 

@Nihed 

BeaBF_0-1668702853040.png

 

 

I couldn’t have sent you this I’ve been sitting for a while and it’s not working

Helpful resources

Announcements
Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

October Power BI Update Carousel

Power BI Monthly Update - October 2025

Check out the October 2025 Power BI update to learn about new features.

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.