The ultimate Fabric, Power BI, SQL, and AI community-led learning event. Save €200 with code FABCOMM.
Get registeredCompete to become Power BI Data Viz World Champion! First round ends August 18th. Get started.
Hi community!
I have a simple table with this structure:
Order | Article | Value |
100 | A | 4 |
100 | B | 5 |
100 | C | 6 |
101 | A | 5 |
Now I would like to add an additonal column the shows me per Order the number of articles.
But how?
Solved! Go to Solution.
[# Articles] = // calc column
var OrderId = T[OrderId]
return
COUNTROWS(
SUMMARIZE(
FILTER(
T, // name of the table
T[Order] = OrderId
),
T[Article]
)
)
[# Articles] = // calc column
var OrderId = T[OrderId]
return
COUNTROWS(
SUMMARIZE(
FILTER(
T, // name of the table
T[Order] = OrderId
),
T[Article]
)
)
User | Count |
---|---|
16 | |
8 | |
6 | |
6 | |
5 |
User | Count |
---|---|
23 | |
13 | |
13 | |
8 | |
8 |