Forum Discussion
Calculated measure impacting Waterfall Chart
- 6 years ago
Hi jazking123 ,
After my testing, you could edit your measure like the following DAX:
Sales Per Kilogram = CALCULATE ( DIVIDE ( CALCULATE ( SUM ( Sheet1[Sales Dollars] ), ALLSELECTED ( Sheet1[Item Description] ) ), CALCULATE ( SUM ( Sheet1[Weight] ), ALLSELECTED ( Sheet1[Item Category] ) ) ) )Here is the result.
Hi jazking123 ,
After my testing, you could edit your measure like the following DAX:
Sales Per Kilogram =
CALCULATE (
DIVIDE (
CALCULATE (
SUM ( Sheet1[Sales Dollars] ),
ALLSELECTED ( Sheet1[Item Description] )
),
CALCULATE ( SUM ( Sheet1[Weight] ), ALLSELECTED ( Sheet1[Item Category] ) )
)
)
Here is the result.
- jazking1236 years agoFrequent Visitor
Thank you so much!
The solution works well. You have saved our sanity.
- jazking1236 years agoFrequent Visitor
v-eachen-msft Thank you very much for your help, it works perfectly. Quick question, I've now set up my sheet so that Sales Dollars and Weight are now attributes in the same column rather than seperate columns. I thought I could use the following filters, but it doesn't seem compatible with ALLEXCEPT.
Sales Per KG =
VAR FilteredSales =
FILTER (
'Sheet1', [Attribute] = "Sales Dollars"
)VAR FilteredWeight =
FILTER (
'Sheet1', [Attribute] = "Weight"
)RETURN
CALCULATE (
DIVIDE (
CALCULATE (
SUM ( 'Sheet1'[Value] ),
ALLSELECTED ( Sheet1[Attribute]),FilteredSales),
CALCULATE (
SUM ( 'Sheet1'[Value] ),
ALLSELECTED ( Sheet1[Item Category] ),
FilteredWeight
)
)
)I hate to ask again, but I've spent all day trying to figure this out. Do you happen to know how I should approach this?