Forum Discussion
masitbaha
8 years agoRegular Visitor
Getting % by group (stacked column chart) - with filtered item
Hi guys. Need help. My data is like this; Week Product Qty Pass/Fail EXPECTED_RESULT 1 A 2 Fail 2/(2+3+4+6) = 13....
- 8 years ago
As a MEASURE try this one
Measure = IF ( HASONEVALUE ( TableName[Qty] ), VALUES ( TableName[Qty] ) / CALCULATE ( SUM ( TableName[Qty] ), FILTER ( ALL ( TableName ), TableName[Week] = VALUES ( TableName[Week] ) ) ) )
Eric_Zhang
Microsoft Employee
8 years agoYou can try a measure as below. See more details in the attached pbix file.
perc =
SUM ( yourTable[Qty] )
/ CALCULATE (
SUM ( yourTable[Qty] ),
ALLEXCEPT ( yourTable, yourTable[Week], yourTable[Pass/Fail] )
)
masitbaha
8 years agoRegular Visitor
Thanks. This is not what i want, but i've found the solution to it.
:)