Totals for Growth indicator

sergiy razumov

New Member
Joined
Nov 3, 2015
Messages
2
Hi, everybody!<o:p></o:p>
I’m quite new to DAX and have a situation that I don’t know howto handle.<o:p></o:p>
I’ve a measure that calculates growth of Students enrollmentcomparing to the previous year:

<o:p></o:p>
Code:
mGrowthAccepted[CoE]:=IF(ISBLANK([mCostOfCampaighn]),BLANK(),<o:p></o:p>
[B]                [mStud(Accepted[CoE]])]-[mStud(Accepted[CoE]]_LY)]<o:p></o:p>[/B]
)

It works just fine if data is in context of years. But on GrandTotals I have zeros (there is no previous years for Totals).
<o:p></o:p>
Can somebody suggest please how this formula can be modifiedto show for Grand Totals the sum of individual years’ growth, so that in GT wehave growth of the students for all the years? That sounds like iteration overthe years, yet I have no idea, how to manage this situation in DAX.<o:p></o:p>
 

Excel Facts

Is there a shortcut key for strikethrough?
Ctrl+S is used for Save. Ctrl+5 is used for Strikethrough. Why Ctrl+5? When you use hashmarks to count |||| is 4, strike through to mean 5.
There are many nuances that you will discover as you learn DAX. This is one of them. In the pre-self service world, the IT guys would have sorted this out and you would not have to deal with it. This is why it can be challenging for Excel users.

In this scenario there is no valid answer at the grand total level, because growth ONLY makes sense in the context of a single year. Every time there is more than one year in your data (as in a grand total) there is no valid answer. One approach is to wrap your formula in another if statement

=if(hasonevalue(calendar[year],YOURMEASURE)

this will return a blank anywhere there is more than 1 year present.

you will probably learn faster and with less pain with my book if you are interested. Http://Xbi.com.au/learndax
 
Last edited:
Upvote 0

Forum statistics

Threads
1,224,152
Messages
6,176,722
Members
452,740
Latest member
MrCY

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