Power BI is turning 10! Tune in for a special live episode on July 24 with behind-the-scenes stories, product evolution highlights, and a sneak peek at what’s in store for the future.
Save the dateEnhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.
Hi,
I'm trying to have a new column that classifies a row based on newest creation date, still filtering by product_type, country, FY_Q.
Expected result:
Created Date | Region | Country | FY - Quarter | Product Type | New_Column |
10/27/2022 17:43 | Asia-Pacific | ASN | FY23 - Q1 | Product A | 1 |
11/4/2022 0:23 | Asia-Pacific | ASN | FY23 - Q2 | Product A | 1 |
10/27/2022 17:43 | Asia-Pacific | ASN | FY23 - Q2 | Product A | 0 |
11/4/2022 0:23 | Asia-Pacific | ASN | FY23 - Q3 | Product A | 1 |
10/27/2022 17:43 | Asia-Pacific | ASN | FY23 - Q3 | Product A | 0 |
11/4/2022 0:23 | Asia-Pacific | ASN | FY23 - Q4 | Product A | 1 |
10/27/2022 17:43 | Asia-Pacific | ASN | FY23 - Q4 | Product A | 0 |
11/4/2022 0:23 | Asia-Pacific | ASN | FY23 - Q1 | Product C | 1 |
10/27/2022 17:43 | Asia-Pacific | ASN | FY23 - Q1 | Product C | 0 |
11/4/2022 0:23 | Asia-Pacific | ASN | FY23 - Q2 | Product C | 1 |
10/27/2022 17:43 | Asia-Pacific | ASN | FY23 - Q2 | Product C | 0 |
11/4/2022 0:23 | Asia-Pacific | ASN | FY23 - Q3 | Product C | 1 |
10/27/2022 17:43 | Asia-Pacific | ASN | FY23 - Q3 | Product C | 0 |
11/4/2022 0:23 | Asia-Pacific | ASN | FY23 - Q4 | Product C | 1 |
10/27/2022 17:43 | Asia-Pacific | ASN | FY23 - Q4 | Product C | 0 |
11/4/2022 0:23 | Asia-Pacific | ASN | FY23 - Q1 | Product D | 1 |
10/27/2022 17:43 | Asia-Pacific | ASN | FY23 - Q1 | Product D | 0 |
11/4/2022 0:23 | Asia-Pacific | ASN | FY23 - Q2 | Product D | 1 |
10/27/2022 17:43 | Asia-Pacific | ASN | FY23 - Q2 | Product D | 0 |
11/4/2022 0:23 | Asia-Pacific | ASN | FY23 - Q3 | Product D | 1 |
10/27/2022 17:43 | Asia-Pacific | ASN | FY23 - Q3 | Product D | 0 |
10/27/2022 17:43 | Asia-Pacific | ASN | FY23 - Q4 | Product D | 1 |
11/9/2022 22:14 | Asia-Pacific | AUS | FY23 - Q1 | Product A | 1 |
10/27/2022 17:43 | Asia-Pacific | AUS | FY23 - Q1 | Product A | 0 |
11/9/2022 22:14 | Asia-Pacific | AUS | FY23 - Q2 | Product A | 1 |
10/27/2022 17:43 | Asia-Pacific | AUS | FY23 - Q2 | Product A | 0 |
11/9/2022 22:14 | Asia-Pacific | AUS | FY23 - Q3 | Product A | 1 |
10/27/2022 17:43 | Asia-Pacific | AUS | FY23 - Q3 | Product A | 0 |
11/9/2022 22:14 | Asia-Pacific | AUS | FY23 - Q4 | Product A | 1 |
10/27/2022 17:43 | Asia-Pacific | AUS | FY23 - Q4 | Product A | 0 |
11/9/2022 22:14 | Asia-Pacific | AUS | FY23 - Q1 | Product B | 1 |
11/9/2022 22:14 | Asia-Pacific | AUS | FY23 - Q2 | Product B | 1 |
11/9/2022 22:14 | Asia-Pacific | AUS | FY23 - Q3 | Product B | 1 |
11/9/2022 22:14 | Asia-Pacific | AUS | FY23 - Q4 | Product B | 1 |
11/9/2022 22:14 | Asia-Pacific | AUS | FY23 - Q1 | Product C | 1 |
10/27/2022 17:43 | Asia-Pacific | AUS | FY23 - Q1 | Product C | 0 |
11/9/2022 22:14 | Asia-Pacific | AUS | FY23 - Q2 | Product C | 1 |
10/27/2022 17:43 | Asia-Pacific | AUS | FY23 - Q2 | Product C | 0 |
11/9/2022 22:14 | Asia-Pacific | AUS | FY23 - Q3 | Product C | 1 |
10/27/2022 17:43 | Asia-Pacific | AUS | FY23 - Q3 | Product C | 0 |
11/9/2022 22:14 | Asia-Pacific | AUS | FY23 - Q4 | Product C | 1 |
10/27/2022 17:43 | Asia-Pacific | AUS | FY23 - Q4 | Product C | 0 |
11/9/2022 22:14 | Asia-Pacific | AUS | FY23 - Q1 | Product D | 1 |
10/27/2022 17:43 | Asia-Pacific | AUS | FY23 - Q1 | Product D | 0 |
11/9/2022 22:14 | Asia-Pacific | AUS | FY23 - Q2 | Product D | 1 |
10/27/2022 17:43 | Asia-Pacific | AUS | FY23 - Q2 | Product D | 0 |
11/9/2022 22:14 | Asia-Pacific | AUS | FY23 - Q3 | Product D | 1 |
10/27/2022 17:43 | Asia-Pacific | AUS | FY23 - Q3 | Product D | 0 |
11/9/2022 22:14 | Asia-Pacific | AUS | FY23 - Q4 | Product D | 1 |
10/27/2022 17:43 | Asia-Pacific | AUS | FY23 - Q4 | Product D | 0 |
Solved! Go to Solution.
a new column that classifies a row based on newest creation date, still filtering by product_type, country, FY_Q.
You cannot create columns based on measures/filters. Columns are immutable.
You can still add the column but it will have to be based on the full data set.
Column =
var c = [Country]
var p = [Product Type]
var f = [FY - Quarter]
var mints = calculate(min('Table'[Created Date]),All('Table'),'Table'[Country]=c,'Table'[Product Type]=p,'Table'[FY - Quarter]=f)
return if([Created Date]=mints,1,0)
see attached
Hello Ibendlin,
Thank you for sharing your solution, it works perfectly and its exactly what I was looking for.
Best Regards,
Fernando Freitas
a new column that classifies a row based on newest creation date, still filtering by product_type, country, FY_Q.
You cannot create columns based on measures/filters. Columns are immutable.
You can still add the column but it will have to be based on the full data set.
Column =
var c = [Country]
var p = [Product Type]
var f = [FY - Quarter]
var mints = calculate(min('Table'[Created Date]),All('Table'),'Table'[Country]=c,'Table'[Product Type]=p,'Table'[FY - Quarter]=f)
return if([Created Date]=mints,1,0)
see attached
Check out the July 2025 Power BI update to learn about new features.
This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.
User | Count |
---|---|
65 | |
63 | |
53 | |
39 | |
26 |
User | Count |
---|---|
85 | |
57 | |
45 | |
44 | |
37 |