Advance your Data & AI career with 50 days of live learning, dataviz contests, hands-on challenges, study groups & certifications and more!
Get registeredGet Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now
Hello
I'd like to know how to see the last value of one column filtering by others. I paste sample table.
Before:
| ID0 | ID1 | Question | Answer |
| 8 | AAAVTUHJ | A | 0 |
| 7 | AAAVTUHJ | A | 0 |
| 6 | AAAVTUHJ | A | 1 |
| 5 | AAAVTUHJ | B | 1 |
| 4 | AAAVTUHJ | B | 1 |
| 3 | AAAVTUHJ | B | 1 |
| 2 | AAAVTUHJ | C | 1 |
| 1 | AAAVTUHJ | C | 0 |
After:
| ID0 | ID1 | Question | Answer | NewColumn |
| 8 | AAAVTUHJ | A | 0 | 0 |
| 7 | AAAVTUHJ | A | 0 | |
| 6 | AAAVTUHJ | A | 1 | |
| 5 | AAAVTUHJ | B | 1 | 1 |
| 4 | AAAVTUHJ | B | 1 | |
| 3 | AAAVTUHJ | B | 1 | |
| 2 | AAAVTUHJ | C | 1 | 1 |
| 1 | AAAVTUHJ | C | 0 |
Greetings and thanks in advance,
Xavi
Solved! Go to Solution.
Hi @Syndicate_Admin ,
Please refer to the formulas.
//If you want a measure
Measure 4 =
VAR x =
MAXX(
FILTER( ALL(Sheet7), [ID1] = MAX([ID1]) && [Question] = MAX([Question]) ),
[ID0]
)
RETURN
CALCULATE(
MAX(Sheet7[Answer]),
FILTER(
Sheet7,
Sheet7[ID0] = x
)
)
If you want a calculated column.
// If you want a column
Column =
VAR x =
MAXX(
FILTER( Sheet7, [ID1] = EARLIER([ID1]) && [Question] = EARLIER(Sheet7[Question]) ),
[ID0]
)
RETURN
IF(
[ID0] = x,
[Answer], BLANK()
)
Best regards,
Lionel Chen
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi @Syndicate_Admin ,
Please refer to the formulas.
//If you want a measure
Measure 4 =
VAR x =
MAXX(
FILTER( ALL(Sheet7), [ID1] = MAX([ID1]) && [Question] = MAX([Question]) ),
[ID0]
)
RETURN
CALCULATE(
MAX(Sheet7[Answer]),
FILTER(
Sheet7,
Sheet7[ID0] = x
)
)
If you want a calculated column.
// If you want a column
Column =
VAR x =
MAXX(
FILTER( Sheet7, [ID1] = EARLIER([ID1]) && [Question] = EARLIER(Sheet7[Question]) ),
[ID0]
)
RETURN
IF(
[ID0] = x,
[Answer], BLANK()
)
Best regards,
Lionel Chen
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi @Syndicate_Admin ,
Create the followng calculated column as follows:
Hello
When I apply this formula the result is as follows:
For example, values 1 do not appear in the Output column
The formula is as follows (the table is called Label Oil)
Hi,
Question and Answer are a different columns.
Hi @Syndicate_Admin ,
Ok they are different columns I understand. But the output is right based on the requireemnt.
Thanks,
Pragati
@Syndicate_Admin , Create a new column
new column =
var _1 = countx(filter(Table, [ID1] =earlier[ID1] && [Answer] =0),[ID1])+0
var _2 = MinX(filter(Table, [ID1] =earlier[ID1] ),[ID0])
return
if([ID0] =_2 ,if(_1>0 0, 1),blank())
Hi,
When you writte "á" "?", what does a mean?
Regards,
Xavi
Check out the November 2025 Power BI update to learn about new features.
Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!
| User | Count |
|---|---|
| 96 | |
| 70 | |
| 50 | |
| 42 | |
| 40 |