Advance your Data & AI career with 50 days of live learning, dataviz contests, hands-on challenges, study groups & certifications and more!
Get registeredJoin 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.
Hi All, i have a table as follow and would like to add a column custom column (TTL Item as follow) in power query that counts all the rows that are >= 1, i have found multiple formulas but they didn't calculate correctly. Can you please help?
| Name | Apple | Banana | Grapes | TTL Item |
| John | 1 | 2 | 2 | |
| Mary | 2 | 1 | ||
| David | 1 | 3 | 4 | 3 |
| Tom | 1 | 1 | 2 |
Solved! Go to Solution.
Source Data
Replacing null with 0
Finding the Apple Count
Same way Banana and Grapes Count is found
Total Item=Apple Count+Banana Count+Grapes Count
If this solves your issue then please accept the same as your solution.
Source Data
Replacing null with 0
Finding the Apple Count
Same way Banana and Grapes Count is found
Total Item=Apple Count+Banana Count+Grapes Count
If this solves your issue then please accept the same as your solution.
Hi,
I am not sure if I understood your quetion correctly, but please check the below picture and the attached pbix file.
let
Source = Data_source,
#"Unpivoted Other Columns" = Table.UnpivotOtherColumns(Source, {"Name"}, "Attribute", "Value"),
#"Filtered Rows" = Table.SelectRows(#"Unpivoted Other Columns", each [Value] >= 1),
#"Grouped Rows" = Table.Group(#"Filtered Rows", {"Name"}, {{"TTL Item", each Table.RowCount(_), Int64.Type}}),
#"bring back Source" = Source,
#"Merged Queries" = Table.NestedJoin(#"bring back Source", {"Name"}, #"Grouped Rows", {"Name"}, "Grouped Rows", JoinKind.LeftOuter),
#"Expanded Grouped Rows" = Table.ExpandTableColumn(#"Merged Queries", "Grouped Rows", {"TTL Item"}, {"TTL Item"})
in
#"Expanded Grouped Rows"
Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes!
Check out the October 2025 Power BI update to learn about new features.
| User | Count |
|---|---|
| 11 | |
| 9 | |
| 8 | |
| 6 | |
| 6 |