Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Join us for an expert-led overview of the tools and concepts you'll need to become a Certified Power BI Data Analyst and pass exam PL-300. Register now.

Reply
RingoMoon
Frequent Visitor

Creating a new calculated column makes an existing calculated column blank

I have a table which contains event name, event edition code(year), revenue and then a calculated column called Prior Year which derives the prior year based on the last year with non blank revenue. As seen below, it works fine, the calculated column is returning the values I want

RingoMoon_0-1718112265954.png

 

The issue is when I create a new calculated column called key. For some reason, when I create that calculated column, the Prior Year calculated column from before turns up blank as seen below. I've played around with it creating a new column with just key = 'Prior Editions'[eventeditioncode] is enough to make the Prior Year column become blank

key = 
CONCATENATE(
    'Prior Editions'[eventname],
    'Prior Editions'[eventeditioncode]
)

RingoMoon_1-1718112344125.png

 

What in the world is going on? I've never ever encountered this kind of issue before!

1 ACCEPTED SOLUTION
rajendraongole1
Super User
Super User

Hi @RingoMoon - Hope you have first created the prior year column then key column.You can check the dependency view in Power BI to see how columns are dependent on each other.

 

Slight modification in Prior Key calculation:

Prior Year =
VAR CurrentYear = 'Events'[EventEditionCode]
VAR EventName = 'Events'[EventName]
RETURN
CALCULATE(
MAX('Events'[EventEditionCode]),
FILTER(
'Events',
'Events'[EventName] = EventName &&
'Events'[EventEditionCode] < CurrentYear &&
NOT(ISBLANK('Events'[Revenue]))
)
)

 

Now define your key column :

key =
CONCATENATE(
'Events'[EventName],
'Events'[EventEditionCode]
)

 

try the above calculation and make sure the key column and prior key columns are not dependant each other (circular dependency). Hope it works . please try

 

Did I answer your question? Mark my post as a solution! This will help others on the forum!
Appreciate your Kudos!!





Did I answer your question? Mark my post as a solution!

Proud to be a Super User!





View solution in original post

1 REPLY 1
rajendraongole1
Super User
Super User

Hi @RingoMoon - Hope you have first created the prior year column then key column.You can check the dependency view in Power BI to see how columns are dependent on each other.

 

Slight modification in Prior Key calculation:

Prior Year =
VAR CurrentYear = 'Events'[EventEditionCode]
VAR EventName = 'Events'[EventName]
RETURN
CALCULATE(
MAX('Events'[EventEditionCode]),
FILTER(
'Events',
'Events'[EventName] = EventName &&
'Events'[EventEditionCode] < CurrentYear &&
NOT(ISBLANK('Events'[Revenue]))
)
)

 

Now define your key column :

key =
CONCATENATE(
'Events'[EventName],
'Events'[EventEditionCode]
)

 

try the above calculation and make sure the key column and prior key columns are not dependant each other (circular dependency). Hope it works . please try

 

Did I answer your question? Mark my post as a solution! This will help others on the forum!
Appreciate your Kudos!!





Did I answer your question? Mark my post as a solution!

Proud to be a Super User!





Helpful resources

Announcements
Join our Fabric User Panel

Join our Fabric User Panel

This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.

June 2025 Power BI Update Carousel

Power BI Monthly Update - June 2025

Check out the June 2025 Power BI update to learn about new features.

June 2025 community update carousel

Fabric Community Update - June 2025

Find out what's new and trending in the Fabric community.