Forum Discussion
hayali01
5 years agoRegular Visitor
Filter by Value code in Measure
Hello, I want to select certain cost codes in the cost code column to allow divison by another value. In a very simplified version I want to total the cost of the A codes and divide by the average ar...
wdx223_Daniel
5 years agoCommunity Champion
=VAR _c=LEFT(MAX('Table'[Cost Code]),FIND(".",MAX('Table'[Cost Code]),,99)-1) RETURN CALCULATE(DIVIDE(SUM('Table'[Cost]),AVERAGE('Table'[Area (m2)]),0),LEFT('Table'[Cost Code],FIND(".",'Table'[Cost Code],,99)-1)=_c)