DAX formula not accommodating legend/series variable

Paul-NYS

New Member
Joined
Feb 6, 2012
Messages
23
Hi Everyone
I have the below DAX formula that I am using for a pivot and chart that displays a cumulative percent of values over 6 month intervals--below is a link that has screenshots of the chart and pivot, slicers, etc. The StartYear variable is in the series/legend area of the pivot.

When I select just one year in the StartYear slicer, the pivot and chart display the correct values. However, when I select multiple years, it appears to add the values for the years together--see screenshots.

Does anyone know how to accommodate the legend variable in DAX so that its values are counted separately?

Paul

=(CALCULATE(countrows(s1Perm1),FILTER(ALLSELECTED(s1Perm1),s1Perm1[ExitMonthCategory] <= MAX(s1Perm1[exitMonthCategory]))))/(CALCULATE(COUNTROWS(s1Perm1),ALL(s1Perm1[Exit],s1Perm1[ExitMonthCategory])))


Link to screenshots:
http://www.nycourts.gov/surveys/cwcip/dax041714.zip
 

Excel Facts

Copy a format multiple times
Select a formatted range. Double-click the Format Painter (left side of Home tab). You can paste formatting multiple times. Esc to stop
What I am trying to do is to find a DAX function that will not cumulate the 'startyear' variable that is in the Legend/Series in the pivot table. The below functions just cause the startyear values to cumulate all together (2006+2007+2008....) instead of treating the years as separate values:


=(CALCULATE(countrows(s1Perm1),FILTER(ALLSELECTED(s1Perm1),s1Perm1[ExitMonthCategory] <= MAX(s1Perm1[ExitMonthCategory]))))/(CALCULATE(COUNTROWS(s1Perm1),ALL(s1Perm1[Exit],s1Perm1[ExitMonthCategory])))



metricchart.jpg
 
Upvote 0

Forum statistics

Threads
1,223,992
Messages
6,175,823
Members
452,672
Latest member
missbanana

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top