Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and more. Get started
I have below data , want show running headcount for last 5 years.
Year | Headcount |
2010 | 100 |
2011 | 200 |
2012 | 300 |
2013 | 400 |
2014 | 500 |
2015 | 600 |
2016 | 700 |
2017 | 800 |
2018 | 900 |
Output :
Year | Running Headcount |
2010 | |
2011 | |
2012 | |
2013 | |
2014 | 1500 |
2015 | 2100 |
2016 | 2800 |
2017 | 3600 |
2018 | 4500 |
Solved! Go to Solution.
Hi @Chennaiah,
You can create a measure below:
Running Headcount = var LY=MAXX(ALL(Table1),'Table1'[Year])
return
IF(MAX(Table1[Year])<=LY-5,BLANK(),CALCULATE(SUM(Table1[Headcount]),FILTER(ALL(Table1),Table1[Year]<=MAX(Table1[Year]))))
Best Regards,
Qiuyun Yu
Hi @Chennaiah,
You can create a measure below:
Running Headcount = var LY=MAXX(ALL(Table1),'Table1'[Year])
return
IF(MAX(Table1[Year])<=LY-5,BLANK(),CALCULATE(SUM(Table1[Headcount]),FILTER(ALL(Table1),Table1[Year]<=MAX(Table1[Year]))))
Best Regards,
Qiuyun Yu
Check out the September 2024 Power BI update to learn about new features.
Learn from experts, get hands-on experience, and win awesome prizes.
User | Count |
---|---|
110 | |
102 | |
99 | |
38 | |
37 |
User | Count |
---|---|
158 | |
125 | |
76 | |
74 | |
63 |