The ultimate Fabric, Power BI, SQL, and AI community-led learning event. Save €200 with code FABCOMM.
Get registeredEnhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.
I am currently working on a formula that was given to me for weighing items based on a designated Option. I have it working but only for the initial quarter, it doesn't distribute out to the rest of the quarters in the year. I am currenly only getting the Project Start Date and End date, I used the Start Date but recognized my error when the other quarters weren't reporting any data. Does anyone have any ideas on an approach to distribute based on quarters even though I only have a start and end date?
@DCampbellTSS
Please try this modifed version where both start and end dates are considered:
Schedule Weight =
VAR StartQtr = QUARTER([admin_projects.start_date])
VAR EndQtr = QUARTER([admin_projects.end_date])
VAR TotalQuarters = EndQtr - StartQtr + 1
VAR CurrentQtr = SELECTEDVALUE('Calendar'[Quarter])
RETURN
IF(
StartQtr <= CurrentQtr && CurrentQtr <= EndQtr,
SWITCH(
TRUE(),
[cost_budget_properties.value] = "Option 1",
(1 / TotalQuarters) * [cost_budgets.quantity],
[cost_budget_properties.value] = "Option 2",
LOOKUPVALUE(Option2Weights[Weight], Option2Weights[Quarter], CurrentQtr) * [cost_budgets.quantity],
[cost_budget_properties.value] = "Option 3",
LOOKUPVALUE(Option3Weights[Weight], Option3Weights[Quarter], CurrentQtr) * [cost_budgets.quantity],
0
),
0
)
⭕ Subscribe and learn Power BI from these videos
⚪ Website ⚪ LinkedIn ⚪ PBI User Group
User | Count |
---|---|
25 | |
12 | |
8 | |
8 | |
5 |
User | Count |
---|---|
28 | |
13 | |
12 | |
12 | |
6 |