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.
Hello PBI community,
Currently I have the following measure in place which performs a standard budget allocation over the number of days in the month for each day. I am trying to show the running grand total in the pivot grand total cell, however, I am continuing to get a blank although I want to show the final date value (the running total) as part of grand total cell.
My current measure is:
SR YTD Targets =
VAR
LastNonBlankValue =
CALCULATE (
MAX ( DIM_Dates[Date] ) )
VAR
BudgetAllocations =
IF (
MAX ( DIM_Dates[Date] ) > TODAY(), BLANK(),
CALCULATE (
SUMX (
SUMMARIZE (
FILTER (
DIM_Dates,
DIM_Dates[Year] > 2017
),
DIM_Dates[Date], "Budgets", [SR Target Allocation]
),
[Budgets]
),
FILTER (
ALLSELECTED ( DIM_Dates ),
DIM_Dates[Date] <= MAX ( DIM_Dates[Date] )
)
)
)
VAR
TotalYTDTargets =
CALCULATE ( [All Targets],
FILTER (
ALL ( DIM_Dates ),
DIM_Dates[Year] > 2017
),
DIM_Dates[Date] <= TODAY() )
RETURN
IF (
HASONEVALUE ( DIM_Dates[Date] ),
BudgetAllocations,
CALCULATE (
BudgetAllocations,
ALLSELECTED ( DIM_Dates[Date] ),
DIM_Dates[Date] = LastNonBlankValue
)
)
Can anyone see why my code is displaying a blank value? I need it to show the last non-blank date in the current context, which would be the total on the 6/4/2018 (9,224,857,148)
Any help would be greatly appreciated in order to acheive this in the grand total.
Hi @toddpbi
I make a test with your measure, but can’t reproduce your issue.
In the table,” All Targets”, “SR Target Allocation” and “SR YTD Targets” are measures.
I’m afraid your dataset is not like this, could you give some example for better analysis.
Best Regards
Maggie
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 | |
99 | |
82 | |
70 | |
61 |
User | Count |
---|---|
149 | |
114 | |
107 | |
89 | |
67 |