Randy
Randy

Reputation: 33

Power Bi Dax change denominator

enter image description here

my return measure looks like this RETURN

DIVIDE( [static_measure], [volume_measure] , 0)

I want this, If color YELLOW is on the matrix, I want YELLOW only to by divided by new_volume_measure.

enter image description here

Upvotes: 1

Views: 72

Answers (1)

Sam Nseir
Sam Nseir

Reputation: 12111

You can use SELECTEDVALUE:

My Measure = 
  ...
  RETURN SWITCH( SELECTEDVALUE('YourTable'[COLORS]),
    "YELLOW", DIVIDE( [static_measure], [new_volume_measure] , 0) ,
    DIVIDE( [static_measure], [volume_measure] , 0)
  )

Upvotes: 1

Related Questions