dax measure to calculate age

Peter083

Board Regular
Joined
Feb 26, 2011
Messages
53
I have a Customer Table with the customers date of birth and this table is linked to a Transaction Table through the Customers Acc No. In the Transactions Table I have 15 years of data. I am trying to analyse the value of the transactions by the age of the customer in each of the 15 years. I am also trying to create age bands for these customers to create a pivot table that shows the age bands of the customers in the rows and the years in the columns.

Can anyone please help with the dax code to create such measures or if you can point me to an article describing how to do this, it will be greatly appreciated.

Thanks


Peter
 

Excel Facts

Back into an answer in Excel
Use Data, What-If Analysis, Goal Seek to find the correct input cell value to reach a desired result
If you want to slice the data based on age bands, you must use a calculated column. But if you use a calc column, you cannot dynamically adjust the column based on the pivot table selection. Read my blog post on this topic here Banding in DAX - Excelerator BI I would suggest you create an age band in your fact table (not the customer table), as doing it this way will allow you to dynamically track the different ages fo the customers over the 15 years. You can access their DOB using RELATED(Customer[DOB]) from the fact table
 
Upvote 0

Forum statistics

Threads
1,216,070
Messages
6,128,610
Members
449,460
Latest member
jgharbawi

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