Microsoft is giving away 50,000 FREE Microsoft Certification exam vouchers!
Enter the sweepstakes now!See when key Fabric features will launch and what’s already live, all in one place and always up to date. Explore the new Fabric roadmap
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
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]
)
What in the world is going on? I've never ever encountered this kind of issue before!
Solved! Go to Solution.
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!!
Proud to be a 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!!
Proud to be a Super User! | |
User | Count |
---|---|
88 | |
74 | |
69 | |
59 | |
56 |
User | Count |
---|---|
40 | |
38 | |
34 | |
32 | |
28 |