Advance your Data & AI career with 50 days of live learning, dataviz contests, hands-on challenges, study groups & certifications and more!
Get registeredGet Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Learn more
Hi,
I need a help in creating two measures, when two years are selected from year slicer, I want to calculate
Measure-1: the HeadCount number for Min selected year
Measure-2: the Headcount number for Max selected year.
The Head Count measure is already calculated in CalculatedMeasures Table.
Hi,
Try something like this:
MIN_Count = var _minY = MIN(Calendar[Year]) return
CALCULATE(COUNT(Table[Emp_id],ALL(Table[Date]),YEAR(Table[Date])= _minY)
MAX_Count = var _maxY = MAX(Calendar[Year]) return
CALCULATE(COUNT(Table[Emp_id],ALL(Table[Date]),YEAR(Table[Date])= _maxY)
I hope this post helps to solve your issue and if it does consider accepting it as a solution and giving the post a thumbs up!
My LinkedIn: https://www.linkedin.com/in/n%C3%A4ttiahov-00001/
Proud to be a Super User!
Thanks for the reply, But if use COUNT(Table[Emp_id],ALL(Table[Date]),YEAR(Table[Date])= _maxY) expression, It will give the wrong Headcount number.
Can't we use Measure (Measure name is HeadCount) directly in the expression?
Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!
Check out the October 2025 Power BI update to learn about new features.
| User | Count |
|---|---|
| 8 | |
| 5 | |
| 5 | |
| 4 | |
| 3 |
| User | Count |
|---|---|
| 24 | |
| 11 | |
| 10 | |
| 9 | |
| 8 |