Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.
Register now!Vote for your favorite vizzies from the Power BI Dataviz World Championship submissions. Vote now!
Hi Community,
I need to set a Column with a 1 or 0 if a value in a column is new in the Current Month (1) or if it is the same in previous month (0). How can I do that? I have tried many ways but I haven't been able to get to it.
Here is a sample
| Month | Agreement | Is Agreement New? |
| 12/1/2020 | 10 | 1 |
| 12/1/2020 | 11 | 1 |
| 12/1/2020 | 29 | 1 |
| 12/1/2020 | 21 | 1 |
| 12/1/2020 | 20 | 1 |
| 12/1/2020 | 11 | 1 |
| 1/1/2021 | 11 | 0 |
| 1/1/2021 | 40 | 1 |
| 1/1/2021 | 29 | 0 |
Thanks...
Solved! Go to Solution.
@Anonymous
you can create a column
Column = if(ISBLANK(maxx(FILTER('Table','Table'[Agreement]=EARLIER('Table'[Agreement])&&'Table'[Month]<EARLIER('Table'[Month])),'Table'[Month])),1,0)
Proud to be a Super User!
Hi,
This calculated column formula works
=if(ISNUMBER(CALCULATE(COUNTROWS(Data_2),FILTER(Data_2,Data_2[Agreement]=EARLIER(Data_2[Agreement])&&Data_2[Month]<EARLIER(Data_2[Month])))),0,1)
Hope this helps.
Hi @Anonymous
You want a DAX calculated column or M? Here is one DAX column
Is Agreement New? =
VAR PreMonth = DATEADD(AgreementTable[Month],-1,MONTH)
VAR CurAgreement = AgreementTable[Agreement]
VAR T1 = SELECTCOLUMNS(FILTER(ALL(AgreementTable),AgreementTable[Month]=PreMonth),"NEW",[Agreement])
RETURN
IF(CurAgreement IN T1,0,1)
@Anonymous
you can create a column
Column = if(ISBLANK(maxx(FILTER('Table','Table'[Agreement]=EARLIER('Table'[Agreement])&&'Table'[Month]<EARLIER('Table'[Month])),'Table'[Month])),1,0)
Proud to be a Super User!
Hi Ryan_mayu
Great solution. It solved what we were looking for.
Regards,
Albin
Vote for your favorite vizzies from the Power BI World Championship submissions!
If you love stickers, then you will definitely want to check out our Community Sticker Challenge!
Check out the January 2026 Power BI update to learn about new features.
| User | Count |
|---|---|
| 64 | |
| 56 | |
| 43 | |
| 20 | |
| 17 |
| User | Count |
|---|---|
| 123 | |
| 108 | |
| 44 | |
| 32 | |
| 26 |