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
User | Count |
---|---|
136 | |
59 | |
56 | |
55 | |
47 |
User | Count |
---|---|
128 | |
77 | |
55 | |
54 | |
51 |