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 There,
I need a calculated column that indicates whether an ID is new when comparing to other date with a key indicator as per the example below:
| ID | Date | Key Indicator | Result |
| A | 1/03/2020 | 1 | 0 |
| B | 1/03/2020 | 1 | 0 |
| A | 2/03/2020 | 0 | |
| B | 2/03/2020 | 0 | |
| A | 3/03/2020 | 0 | |
| B | 3/03/2020 | 0 | |
| C | 3/03/2020 | 1 |
Key indicator is against 1/03/2020 so this is what I want to compare to.
I want to compare the latest day (3/03/2020) with the day that has the key indicator (1/03/2020) and produce a 1 in the result column if it is in fact a new ID that's been created since the last date with the key indicator, otherwise a 0.
Any help greatly appreciated!!
Solved! Go to Solution.
I figured it out using some of what @amitchandak said and making some changes.
Ended up with a calculated column like this:
I figured it out using some of what @amitchandak said and making some changes.
Ended up with a calculated column like this:
You will not able to change the date in case you use a calculated column. try like a measure
measure =
var _max = maxx('Table','Date'[Date])
var _min = Minx('Table','Date'[Date])
return
if(CALCULATE(distinctCOUNT('Table'[ID]), FILTER(all('Table'), 'Table'[Date]=_max)) - CALCULATE(distinctCOUNT('Table'[ID]), FILTER(all('Table'), 'Table'[Date]=_min)) >=0,1, 0)
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 |
|---|---|
| 36 | |
| 28 | |
| 28 | |
| 20 | |
| 18 |
| User | Count |
|---|---|
| 65 | |
| 35 | |
| 33 | |
| 25 | |
| 24 |