excel - Dynamic sum in dax picking distinct values -


below sample data

week practice  type capacity   gen 1       bi      c       80      0 1       bi      c       80      1 1       bi      sc      160     1 1       bi      pc      240     0 1       bi      pc      240     3 1       bi      mc      1160    1 1       bi      mc      1160    4 1       bi      mc      1160    2 1       bi      ac      440     1 1       bi      d       40      0 1       bi      d       40      3 

i have pivot chart, has 3 slicers namely practice, type, , gen.

when don't select slicer, should distinct sum(capacity) ie.,2120. when click on type slicer mc sum(capacity) should 1160 , click on gen 3 , clear other filters sum(capacity) = 280.

there can many practices , many weeks.

need dax query meet requirement.

you need define 2 dax measures:

support:=max(table1[capacity]) 

and

distinctsumofcapacity:=sumx(distinct(table1[type]),[support]) 

now can add distinctsumofcapacity value section of pivot , you'll distinct sum.


Comments

Popular posts from this blog

android - Get AccessToken using signpost OAuth without opening a browser (Two legged Oauth) -

org.mockito.exceptions.misusing.InvalidUseOfMatchersException: mockito -

google shop client API returns 400 bad request error while adding an item -