PowerBI / DAX - Row wise division by measure -
i heavy user of r trying port basic calculations power bi unable dax perform vector/rowwise division.
for example, dataset:
category value
a 1
a 2
b 3
c 4
i have created measure: value sum = sum(table[value]) , create third column: value share = value / value sum get:
category value value share
a 1 0.1
a 2 0.2
b 3 0.3
c 4 0.4
the equivalent in r table$value.share = table$value/value.sum.
i have tried: value share = [value] / [value sum] ended 1s in value share rows. tried sumx , calculatetable functions believe missing fundamental. can help?
sure! if you're starting out dax, can highly recommend view 1 of video lectures of alberto cairo / marco russo https://www.youtube.com/watch?v=klqazlr5vxa, because question (and of dax difficulty) contexts.
as question, think you're looking
=[value]/calculate(sum([value]); all(tablename))
of course, can replace sum([value])
measure name too.
Comments
Post a Comment