The ultimate Microsoft Fabric, Power BI, Azure AI, and SQL learning event: Join us in Stockholm, September 24-27, 2024.
Save €200 with code MSCUST on top of early bird pricing!
Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and more. Get started
Hello Folks
I'm looking to create a measure to calculate cumulative budget based on distinct week by customer. The data looks something like this:-
The objective is to show table with [CLIENT] || [CUMULATIVE BUDGET] dynamically change when i select the slicer
I manage to create a measure, but somehow it is not showing the desired results.
**bleep** Bud Vol = CALCULATE(sum(BUDGET[AMOUNT]),
filter(VALUES(DATES),
DATES[Week]<= MAX(DATES[Week])))
Any help, please.
Thanks once again, much appreciated.
I tweaked the DAX according to my report attributes, no value showing up. For more clarification, i'm attaching more details about my report requirement and data model.
Hope this make more sense. Please see my DAX based on your suggestion
Absolute Cumulative Budget =
var __absoluteMaxYearWeek =
CALCULATE(
MAX( BUDGET[Year-Week] ),
ALL( BUDGET )
)
var __currentYearWeek = MAX( DATES[Year-Week] )
var __minYearWeek = MIN( DATES[Year-Week])
var __result =
CALCULATE(
[Act Vol (Tr)],
DATES[Year-Week] <= __currentYearWeek,
ALL( DATES )
)
var __onlyOneYearVisible = HASONEVALUE(DATES[Year])
var __currentPeriodNotFullyInTheFuture =
__minYearWeek <= __absoluteMaxYearWeek
var __shouldCalc =
and(
__onlyOneYearVisible,
__currentPeriodNotFullyInTheFuture
)
return
if( __shouldCalc, __result )
Thanks for reminding me @Anonymous . I've added the dates in the table, please see below the revised datasets. Hope this make sense to get the measure based on Cumulative Budget based on distinct week by Customer
Join the community in Stockholm for expert Microsoft Fabric learning including a very exciting keynote from Arun Ulag, Corporate Vice President, Azure Data.
Check out the August 2024 Power BI update to learn about new features.
User | Count |
---|---|
21 | |
19 | |
19 | |
18 | |
14 |
User | Count |
---|---|
42 | |
35 | |
24 | |
20 | |
19 |