Forum Discussion

LorenzoC's avatar
LorenzoC
Regular Visitor
2 years ago
Solved

Measure does not work properly

Dear All, i have the following dataset: Id Date S_Cost D_Cost Tot_D_Cost 1 01/01/2024 500 1500 3300 1 01/01/2024 500 1800 3300 1 03/01/2024 2000 2500 2500 2 01/02/20...
  • lbendlin's avatar
    lbendlin
    2 years ago

    Result = DIVIDE(
    			SUM('Table'[D_Cost])
    			* SUMX(
    				DISTINCT(ALLSELECTED('Table'[S_Cost])),
    				[S_Cost]
    			),
    			CALCULATE(
    				SUM('Table'[D_Cost]),
    				ALLEXCEPT(
    					'Table',
    					'Table'[Id]
    				)
    			)
    		)