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 trying to have a projection column that in essence will say and do the following:
If a pay period has occured and not blank use what exists for that given month, if the pay period hasnt occured and is in the future assume it will use average of existing pay periods of that year. my formula is as follows: What is bolded is what needs to change.
Hi,
Share some data and show the expected result.
Ideally what should be in bolded is the verbal version of
Average of 2022 Actuals that occured on a pay period date that are personnel expenses.
Hi @Anonymous.
You can try to use the following measure formula if it is suitable for your requirement:
Personnel =
SUMX (
VALUES ( 'Calendar'[Month Name] ),
CALCULATE (
VAR currPay =
MAX ( Table[pay period] )
RETURN
IF (
CALCULATE ( SUM ( '6. Actuals'[Actuals] ), 'Calendar'[Year] = 2022 )
= BLANK (),
CALCULATE (
IF (
currPay >= 11
&& currPay <= 26,
10,
IF (
currPay = 10,
AVERAGE ( '6. Actuals'[Actuals] ),
SUM ( '6. Actuals'[Actuals] )
)
),
'Calendar'[Year] = 2021
),
CALCULATE (
IF (
currPay >= 11
&& currPay <= 26,
10,
IF (
currPay = 10,
AVERAGE ( '6. Actuals'[Actuals] ),
SUM ( '6. Actuals'[Actuals] )
)
),
'Calendar'[Year] = 2022
)
),
'6. Actuals',
'5. Chart of Accounts'[Object Category] = "Personnel",
'Pay Period'[Pay Period] = "Yes"
)
)
Regards,
Xiaoxin Sheng
I think this is close! What I want is instead of 1 appearing like we have in the above formula (i think you have ten) I would want the current year's average to appear at all the Blank pay dates that are "Yes" that have not occured. Addiitionally the summing of the formula should equal roughly 70m not 503m but I have not figured out why that is summing that way. Also, I tried replacing the 1 with an average formula but that did not work either.
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 |
---|---|
111 | |
100 | |
80 | |
64 | |
58 |
User | Count |
---|---|
146 | |
110 | |
93 | |
84 | |
67 |