Forum Discussion
Anonymous
4 years agoNot applicable
Dax help : aggregate values by specific columns
Hi, I would like to generate "Aggregated_Qty" by adding "column," instead of "measure" in Power BI. In this case, I would like to base on "Sales Order" and "SKU" to calculated aggregated qty....
- 4 years ago
Anonymous create this column:
Agg Qty = VAR _site = 'Table'[Site] VAR _sku = 'Table'[SKU] RETURN CALCULATE( SUM('Table'[qty]), REMOVEFILTERS('Table'), 'Table'[Site] = _site, 'Table'[SKU] = _sku )
SpartaBI
Community Champion
4 years agoAnonymous create this column:
Agg Qty =
VAR _site = 'Table'[Site]
VAR _sku = 'Table'[SKU]
RETURN
CALCULATE(
SUM('Table'[qty]),
REMOVEFILTERS('Table'),
'Table'[Site] = _site,
'Table'[SKU] = _sku
)
- Anonymous4 years agoNot applicable
SpartaBI Thanks. It is very helpful.
- SpartaBI4 years ago
Community Champion
Anonymous my pleasure 🙂
Hey, check out my showcase report - got some high level stuff there 🙂
https://community.powerbi.com/t5/Data-Stories-Gallery/SpartaBI-Feat-Contoso-100K/td-p/2449543
Give it a thumbs up over there if you liked it 🙂