Forum Discussion
WGO
2 years agoNew Member
Always use sum on different granularity
Hello, I was wondering if anyone could help with following model/dax problem: Simplified, we are getting invoice data from 2 different sources, but the problem is that the granularity from th...
- 2 years ago
I would try this way:
VAR tbl = SUMMARIZE ( [yourTable], [yourTable].[InvoiceNumber], [yourTable].[InvoiceLineNumber], "_quantity", AVERAGE ( [yourTable].[Quantity] ) ) VAR result = SUMX ( tbl, [_quantity] ) RETURN result
ray_codex
Resolver II
2 years agoI would try this way:
VAR tbl =
SUMMARIZE (
[yourTable],
[yourTable].[InvoiceNumber],
[yourTable].[InvoiceLineNumber],
"_quantity", AVERAGE ( [yourTable].[Quantity] )
)
VAR result =
SUMX ( tbl, [_quantity] )
RETURN
result