Forum Discussion
tecumseh
3 years agoResolver III
AddColumns The Value For The Field Be Determined
Hi all,
I set AddColumns to add a new column to a table -- that worked fine (Up to T30 below)
But when I try to reference the column to calculate the Leap Year or not, I receive an error message:
The value for LastAppearanceQuarter cannot be determined.
Why is that?
Try_2 =
VAR T10 = ADDCOLUMNS(VALUES(Bookings[Advertiser]), "FirstAppearance", CALCULATE(MIN(Bookings[Date]), ALLEXCEPT(Bookings,Bookings[Advertiser],Bookings[Channel]), Bookings[Net Revenue] > 0))
VAR T20 = ADDCOLUMNS(T10, "FirstAppearanceQuarter", DATE(YEAR([FirstAppearance]),ROUNDUP( DIVIDE( MONTH( [FirstAppearance] ),3 ),0 ) *3 -2, 1))
VAR T30 = ADDCOLUMNS(T20, "LastAppearanceQuarter", DATE(YEAR([FirstAppearanceQuarter]), MONTH([FirstAppearanceQuarter]) + 9, 1))
VAR LeapYear = MOD(YEAR([LastAppearanceQuarter]),4)
VAR T40 = ADDCOLUMNS(T30,"Leap Year",LeapYear)
Return T40
1 Reply
- fooddCommunity Champion
Please provide your work-in-progress Power BI Desktop file (with sensitive information removed) that covers your issue or question completely in a usable format (not as a screenshot).
Please show the expected outcome based on the sample data you provided.
https://community.fabric.microsoft.com/t5/Desktop/How-to-Get-Your-Question-Answered-Quickly/m-p/1447...This allows members of the Forum to assess the state of the model, report layer, relationships, and any DAX applied.