Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.
Register now!Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now
Hi!
Sorry for the confusing subject. Basically I have two columns, One with POs and the other with Vendors. I do a count of the vendors against teh POs and there are several of them with multiple vendors. What I want to get is the count of the multiple vendors and single vendors against the POs.
For Example:
| PO1 | Count of Vendor |
| PO2 | 2 |
| PO3 | 3 |
| PO4 | 3 |
| PO5 | 3 |
| PO6 | 1 |
| PO7 | 1 |
| PO8 | 1 |
| PO9 | 1 |
| PO10 | 1 |
| PO11 | 1 |
What I want to get is the count as to how many times its repated:
Result = 2 is 2 times
3 is 3 times
1 is 6 times
Thanks
Solved! Go to Solution.
If you want a count in Power Query that returns the counts in a table, group by the count column. Returns this table.
1) In Power Query, select New Source, then Blank Query
2) On the Home ribbon, select "Advanced Editor" button
3) Remove everything you see, then paste the M code I've given you in that box.
4) Press Done
let
Source = Table.FromRows(Json.Document(Binary.Decompress(Binary.FromText("i45WCvA3VEAGSjpKRkqxOiAJIzS+MYRrDOWaoPBMUXhmUK2GUL45KtcCTdoSjW9ogC5giBCIBQA=", BinaryEncoding.Base64), Compression.Deflate)), let _t = ((type text) meta [Serialized.Text = true]) in type table [POs = _t, Counts = _t]),
#"Changed Type" = Table.TransformColumnTypes(Source,{{"POs", type text}, {"Counts", Int64.Type}}),
#"Grouped Rows" = Table.Group(#"Changed Type", {"Counts"}, {{"Count", each Table.RowCount(_), type number}})
in
#"Grouped Rows"
If you want it in DAX, simply put your Counts in a table, tell the visual not to aggregate, then use this measure:
Count of Counts = COUNTROWS('Table')
DAX is for Analysis. Power Query is for Data Modeling
Proud to be a Super User!
MCSA: BI ReportingHi @Anonymous ,
You may create measure or column for the Count of Vendor like DAX below.
Measure= CALCULATE(COUNT(Table1[Vendors]),FILTER(ALLSELECTED(Table1), Table1[Pos] =MAX(Table1[Pos])))
Column= CALCULATE(COUNT(Table1[Vendors]),FILTER(ALLSELECTED(Table1), Table1[Pos]=EARLIER(Table1[Pos])))
Best Regards,
Amy
Community Support Team _ Amy
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi @Anonymous ,
You may create measure or column for the Count of Vendor like DAX below.
Measure= CALCULATE(COUNT(Table1[Vendors]),FILTER(ALLSELECTED(Table1), Table1[Pos] =MAX(Table1[Pos])))
Column= CALCULATE(COUNT(Table1[Vendors]),FILTER(ALLSELECTED(Table1), Table1[Pos]=EARLIER(Table1[Pos])))
Best Regards,
Amy
Community Support Team _ Amy
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
If you want a count in Power Query that returns the counts in a table, group by the count column. Returns this table.
1) In Power Query, select New Source, then Blank Query
2) On the Home ribbon, select "Advanced Editor" button
3) Remove everything you see, then paste the M code I've given you in that box.
4) Press Done
let
Source = Table.FromRows(Json.Document(Binary.Decompress(Binary.FromText("i45WCvA3VEAGSjpKRkqxOiAJIzS+MYRrDOWaoPBMUXhmUK2GUL45KtcCTdoSjW9ogC5giBCIBQA=", BinaryEncoding.Base64), Compression.Deflate)), let _t = ((type text) meta [Serialized.Text = true]) in type table [POs = _t, Counts = _t]),
#"Changed Type" = Table.TransformColumnTypes(Source,{{"POs", type text}, {"Counts", Int64.Type}}),
#"Grouped Rows" = Table.Group(#"Changed Type", {"Counts"}, {{"Count", each Table.RowCount(_), type number}})
in
#"Grouped Rows"
If you want it in DAX, simply put your Counts in a table, tell the visual not to aggregate, then use this measure:
Count of Counts = COUNTROWS('Table')
DAX is for Analysis. Power Query is for Data Modeling
Proud to be a Super User!
MCSA: BI ReportingCheck 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 |
|---|---|
| 104 | |
| 81 | |
| 66 | |
| 50 | |
| 45 |