Don't miss your chance to take the Fabric Data Engineer (DP-700) exam on us!
Learn moreWe've captured the moments from FabCon & SQLCon that everyone is talking about, and we are bringing them to the community, live and on-demand. Starts on April 14th. Register now
@Anonymous
please try below formula.
Column =
VAR _count= CALCULATE(COUNTROWS(Sheet7),FILTER(Sheet7,Sheet7[ID]=EARLIER(Sheet7[ID])&&Sheet7[Index]>=EARLIER(Sheet7[Index])))
VAR _count2=CALCULATE(COUNTROWS(Sheet7),FILTER(Sheet7,Sheet7[ID]=EARLIER(Sheet7[ID])))
return if(_count=_count2,1,0)Proud to be a Super User!
@Anonymous
If we understanding is correct, please try below steps.
1. create an index column.
2. try to create a column
Column =
VAR _count= CALCULATE(COUNTROWS(Sheet7),FILTER(Sheet7,Sheet7[ID]=EARLIER(Sheet7[ID])&&Sheet7[Index]>=EARLIER(Sheet7[Index])))
return if(_count>1,1,0)Hope this is helpful.
Proud to be a Super User!
@Anonymous
could please explain the logic of the output?
if found duplicated ,then output 1?
Should the second 702 be 1 because the last line is also 702?
| ID | Desired Output |
| 701 | 1 |
| 701 | 0 |
| 703 | 1 |
| 702 | 1 |
| 702 | 1 |
| 703 | 0 |
| 702 | 0 |
Proud to be a Super User!
| ID | Desired Output |
| 701 | 1 |
| 701 | 0 |
| 703 | 1 |
| 702 | 1 |
| 702 | 0 |
| 703 | 0 |
| 702 | 0 |
If id occuring 2nd time or more than 1st time than output to be 0
Hi @Anonymous ,
You also could try below M code
let
Source = Table.FromRows(Json.Document(Binary.Decompress(Binary.FromText("i45WMjcwVIrVQaaNobQRGo0kHgsA", BinaryEncoding.Base64), Compression.Deflate)), let _t = ((type text) meta [Serialized.Text = true]) in type table [ID = _t]),
#"Changed Type" = Table.TransformColumnTypes(Source,{{"ID", Int64.Type}}),
#"Grouped Rows" = Table.Group(#"Changed Type", {"ID"}, {{"all", each _, type table [ID=number, Desired Output=number]}}),
#"Added Custom" = Table.AddColumn(#"Grouped Rows", "Custom", each Table.AddIndexColumn([all],"index",1,1)),
#"Expanded Custom" = Table.ExpandTableColumn(#"Added Custom", "Custom", {"index"}, {"index"}),
#"Replaced Value" = Table.ReplaceValue(#"Expanded Custom",each [index],each if [index]=1 then 1 else 0,Replacer.ReplaceValue,{"index"}),
#"Removed Columns" = Table.RemoveColumns(#"Replaced Value",{"all"})
in
#"Removed Columns"
Best Regards,
Zoe Zhi
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
@Anonymous
please try below formula.
Column =
VAR _count= CALCULATE(COUNTROWS(Sheet7),FILTER(Sheet7,Sheet7[ID]=EARLIER(Sheet7[ID])&&Sheet7[Index]>=EARLIER(Sheet7[Index])))
VAR _count2=CALCULATE(COUNTROWS(Sheet7),FILTER(Sheet7,Sheet7[ID]=EARLIER(Sheet7[ID])))
return if(_count=_count2,1,0)Proud to be a Super User!
If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.
A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.
Share feedback directly with Fabric product managers, participate in targeted research studies and influence the Fabric roadmap.
| User | Count |
|---|---|
| 51 | |
| 37 | |
| 35 | |
| 19 | |
| 17 |
| User | Count |
|---|---|
| 69 | |
| 65 | |
| 39 | |
| 33 | |
| 23 |