Check your eligibility for this 50% exam voucher offer and join us for free live learning sessions to get prepared for Exam DP-700.
Get StartedDon't miss out! 2025 Microsoft Fabric Community Conference, March 31 - April 2, Las Vegas, Nevada. Use code MSCUST for a $150 discount. Prices go up February 11th. Register now.
Bonjour je cherche un moyen avec List de trouver le nombre de doublons (nb.if) sans passer par le doublon du tableau sur powerquery, merci d’avance
occurrence | nb.SI |
X1 | 2 |
X2 | 4 |
X3 | 3 |
X4 | 1 |
X5 | 1 |
X6 | 2 |
X2 | 4 |
X3 | 3 |
X9 | 1 |
X10 | 1 |
X1 | 2 |
X12 | 1 |
X2 | 4 |
X3 | 3 |
X6 | 2 |
X2 | 4 |
Solved! Go to Solution.
Another method that may be less efficient is to add a custom column with the formula:
List.Count(List.Select(#"Changed Type"[occurrence], (li)=> li = [occurrence]))
To duplicate, paste the code below into a blank query:
let
Source = Table.FromRows(Json.Document(Binary.Decompress(Binary.FromText("i45WijBUitUBUkYQyhhCmUAoUwhlhk2JJYQyNIDSUMoIm1qEAbEA", BinaryEncoding.Base64), Compression.Deflate)), let _t = ((type nullable text) meta [Serialized.Text = true]) in type table [occurrence = _t]),
#"Changed Type" = Table.TransformColumnTypes(Source,{{"occurrence", type text}}),
#"Added Custom" = Table.AddColumn(#"Changed Type", "Count", each
List.Count(
List.Select(#"Changed Type"[occurrence],
(li)=> li = [occurrence])), Int64.Type)
in
#"Added Custom"
In old days it was done by EARLIER function but now you can use varibales to do it.
You can watch this video too.
https://www.youtube.com/watch?v=JI-QUASKuUw
Another method that may be less efficient is to add a custom column with the formula:
List.Count(List.Select(#"Changed Type"[occurrence], (li)=> li = [occurrence]))
To duplicate, paste the code below into a blank query:
let
Source = Table.FromRows(Json.Document(Binary.Decompress(Binary.FromText("i45WijBUitUBUkYQyhhCmUAoUwhlhk2JJYQyNIDSUMoIm1qEAbEA", BinaryEncoding.Base64), Compression.Deflate)), let _t = ((type nullable text) meta [Serialized.Text = true]) in type table [occurrence = _t]),
#"Changed Type" = Table.TransformColumnTypes(Source,{{"occurrence", type text}}),
#"Added Custom" = Table.AddColumn(#"Changed Type", "Count", each
List.Count(
List.Select(#"Changed Type"[occurrence],
(li)=> li = [occurrence])), Int64.Type)
in
#"Added Custom"
too bad that with a line in (list.... power query we can't have that, in powerbi in my case it can't work
Hi @II1154 ,
This is not possible.
You could duplocicate the table / list and apply Group By. Then merge the original table with group by table to see number of duplicates.
If you can, try solution in DAX instead.
Ce n'est pas possible. Vous pouvez dupliquer le tableau/la liste et appliquer Grouper par. Fusionnez ensuite la table d'origine avec groupe par table pour voir le nombre de doublons. Si vous le pouvez, essayez plutôt la solution dans DAX.
March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount! Prices go up Feb. 11th.
Check out the January 2025 Power BI update to learn about new features in Reporting, Modeling, and Data Connectivity.
User | Count |
---|---|
14 | |
13 | |
12 | |
12 | |
12 |