This time we’re going bigger than ever. Fabric, Power BI, SQL, AI and more. We're covering it all. You won't want to miss it.
Learn moreLevel up your Power BI skills this month - build one visual each week and tell better stories with data! Get started
Hi everyone,
I have a requirement from my client to compare in the same table data from a date selected from slicer and the first day of the year. I can't get correct data.
Sample data:
| date_load | ID |
| 01/01/2017 | ID1 |
| 01/01/2017 | ID2 |
| 01/01/2017 | ID3 |
| 01/01/2017 | ID4 |
| 01/06/2017 | ID1 |
| 01/06/2017 | ID2 |
| 01/06/2017 | ID3 |
| 01/09/2017 | ID1 |
| 01/09/2017 | ID2 |
| 31/12/2017 | ID1 |
| 01/01/2018 | ID1 |
| 01/01/2018 | ID7 |
and two measures:
Start Year = CALCULATE(COUNTROWS(Table1);FILTER(Table1;Year(SELECTEDVALUE(Table1[date_load])) = YEar(Table1[date_load])))
Current = COUNTROWS(Table1)
I need to show for 1/1/2017
Start Year = 4
Current =4
and for 31/12/2017
Start Year = 4
Current =1
but get
Start Year = 1
Current =1
Thank you in advance
Solved! Go to Solution.
Try this MEASURE
Start Year =
CALCULATE (
COUNTROWS ( Table1 ),
FILTER (
ALL ( Table1 ),
Table1[date_load] = DATE ( YEAR ( SELECTEDVALUE ( Table1[date_load] ) ), 1, 1 )
)
)
Try this MEASURE
Start Year =
CALCULATE (
COUNTROWS ( Table1 ),
FILTER (
ALL ( Table1 ),
Table1[date_load] = DATE ( YEAR ( SELECTEDVALUE ( Table1[date_load] ) ), 1, 1 )
)
)
Check out the April 2026 Power BI update to learn about new features.
Sign up to receive a private message when registration opens and key events begin.
If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.
| User | Count |
|---|---|
| 31 | |
| 25 | |
| 21 | |
| 18 | |
| 17 |
| User | Count |
|---|---|
| 62 | |
| 34 | |
| 33 | |
| 25 | |
| 24 |