Chapter 16 Disconnected Tables: Banding

A dedicated forum to help people when working through the book "Learn to Write DAX"
Krishna
Posts: 5
Joined: Sat Dec 16, 2017 1:04 am

Chapter 16 Disconnected Tables: Banding

Postby Krishna » Mon Jan 08, 2018 11:19 pm

Hi,

i followed the steps mentioned in the book for Using BANDING but i am getting the issue in creating the calculated field without error

Formula (created in Customers table)
ROUNDDOWN((DATE(YEAR(TODAY()),MONTH(TODAY()),DAY(TODAY()))-Customers[BirthDate])/365,0) in calculated column of customers table
Age Group:=CALCULATE(VALUES(AgeBands[Band]),FILTER(AgeBands,Customers[Age]>=AgeBands[Low] && Customers[Age] < AgeBands[High]))

Error
Calculation error in measure 'Customers'[Age Group]: The value for column 'Age' in table 'Customers' cannot be determined in the current context. Check that all columns referenced in the calculation expression exist, and that there are no circular dependencies. This can also occur when the formula for a measure refers directly to a column without performing any aggregation--such as sum, average, or count--on that column. The column does not have a single value; it has many values, one for each row of the table, and no row has been specified.

please help me on this issue

thanks
Krishna

P3Tom
Posts: 6
Joined: Tue Jan 09, 2018 4:20 pm

Re: Chapter 16 Disconnected Tables: Banding

Postby P3Tom » Tue Jan 09, 2018 5:40 pm

For starters, since TODAY() is a date, you could simplify your calculated column's formula for Age:

Age =
IF (
NOT ( ISBLANK ( Customers[BirthDate] ) ),
ROUNDDOWN ( ( TODAY () - Customers[BirthDate] ) / 365, 0 )
)

Also, I would say that Age Group is probably for a calculated column, since the measure is missing a row context for Customers[Age] which would be available in a calculated column of the Customers table.

Krishna
Posts: 5
Joined: Sat Dec 16, 2017 1:04 am

Re: Chapter 16 Disconnected Tables: Banding

Postby Krishna » Mon Jan 15, 2018 11:27 pm

calculated column Age not missing but still getting Error. followed the steps as described in the book but still Error.


Return to “Help with the Book "Learn to Write DAX"”

Who is online

Users browsing this forum: No registered users and 1 guest

cron