Join us for an expert-led overview of the tools and concepts you'll need to pass exam PL-300. The first session starts on June 11th. See you there!
Get registeredPower BI is turning 10! Let’s celebrate together with dataviz contests, interactive sessions, and giveaways. Register now.
Dear all,
I have a column in my table which i want to be summed on a unique row, but it needs to ignore the 'code' column. So when summing instantly it returns 10. but I need it to be two, since City is changing as well, but this needs to be taken into account.
ID | TYPE | Code | City | Type_ID | Year | Sum |
A | R! | 625 | NY | R1-A | 2023 | 1 |
A | R! | 545 | NY | R1-A | 2023 | 1 |
A | R! | 126 | NY | R1-A | 2023 | 1 |
A | R! | 120 | NY | R1-A | 2023 | 1 |
A | R! | 116 | NY | R1-A | 2023 | 1 |
A | R! | 625 | LA | R1-A | 2023 | 1 |
A | R! | 545 | LA | R1-A | 2023 | 1 |
A | R! | 126 | LA | R1-A | 2023 | 1 |
A | R! | 120 | LA | R1-A | 2023 | 1 |
A | R! | 116 | LA | R1-A | 2023 | 1 |
Solved! Go to Solution.
Hi, @Anonymous
Based on your description, I created data to reproduce your scenario. The pbix file is attached in the end.
Table:
You may create a measure as below.
Sum =
COUNTROWS(
SUMMARIZE(
'Table',
'Table'[ID],
'Table'[City]
)
)
Result:
Best Regards
Allan
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi, @Anonymous
Based on your description, I created data to reproduce your scenario. The pbix file is attached in the end.
Table:
You may create a measure as below.
Sum =
COUNTROWS(
SUMMARIZE(
'Table',
'Table'[ID],
'Table'[City]
)
)
Result:
Best Regards
Allan
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
the result is 2 yes, but lets say my table in real is much longer with different ID in same city
This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.
Check out the June 2025 Power BI update to learn about new features.
User | Count |
---|---|
81 | |
76 | |
61 | |
37 | |
33 |
User | Count |
---|---|
101 | |
56 | |
51 | |
45 | |
40 |