Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.
I am new here and starting with PBI so apologies in advance if the question is stupid.
I have a situation. Here is the table, the columns in black are the ones I have and I need to create a calculated column (in red) showing a target achievement per reps (as decribed in the table below).
As anyone have an idea if its possible ? Thank you in advance for your help
Solved! Go to Solution.
@ckolahi Assuming a Status of A is actuals and B is budget, maybe:
% Achievement Column =
VAR __Name = [Name]
VAR __Measure = [Measure_SIP]
VAR __Status = [Status]
VAR __Month = [Month]
VAr __Year = [Year]
RETURN
IF(
__Status = "B",
0,
VAR __Actual = IF(__Measure = "Net Sales USD", [Net_Sales_USD], [Units])
VAR __Table = FILTER('Table',[Name] = __Name && [Measure_SIP] = __Measure && [Status] = "B" && [Month] = __Month && [Year] = __Year)
VAR __Budget = IF(__Measure = "Net Sales USD", MAXX(__Table, [Net_Sales_USD]), MAXX(__Table, [Units])
RETURN
DIVIDE(__Actual, __Budget, 0)
)
That said, I think you should look into unpivoting your Net_Sales_USD and Units columns and this would likely be a far easier calculation.
@ckolahi Assuming a Status of A is actuals and B is budget, maybe:
% Achievement Column =
VAR __Name = [Name]
VAR __Measure = [Measure_SIP]
VAR __Status = [Status]
VAR __Month = [Month]
VAr __Year = [Year]
RETURN
IF(
__Status = "B",
0,
VAR __Actual = IF(__Measure = "Net Sales USD", [Net_Sales_USD], [Units])
VAR __Table = FILTER('Table',[Name] = __Name && [Measure_SIP] = __Measure && [Status] = "B" && [Month] = __Month && [Year] = __Year)
VAR __Budget = IF(__Measure = "Net Sales USD", MAXX(__Table, [Net_Sales_USD]), MAXX(__Table, [Units])
RETURN
DIVIDE(__Actual, __Budget, 0)
)
That said, I think you should look into unpivoting your Net_Sales_USD and Units columns and this would likely be a far easier calculation.
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
114 | |
100 | |
88 | |
70 | |
61 |
User | Count |
---|---|
151 | |
120 | |
103 | |
87 | |
68 |