Quantcast
Channel: Active questions tagged excel - Stack Overflow
Viewing all articles
Browse latest Browse all 88054

Make measure dependent on a dimension value

$
0
0

I’m trying to use DAX to calculate a percentage value for a list of product properties, this percentage is calculated dividing the sum of the properties divided by either the quantity of the product or the kilograms, depending on the presentation of the product (Which is declared in the dimension table)

Is there a way to make a measure to take this decision? I was thinking in some thing like:

Percentage  = IF( Products[Presentation]= “Kg” ; 
         DIVIDE( SumProp ; Kg ; 0 ) ;
         DIVIDE( SumProp ; Qty ; 0 ) )

I thought on using RELATED() but it didn’t work either.

I know this doesn’t work, but I want to make this automatic without putting filters on it, does anybody know what can I do

Thank you.


Viewing all articles
Browse latest Browse all 88054

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>