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've a drilldown page displaying a table with the following columns - [Region], [Owner], [Week Revenue], [YTD Revenue]
I want the YTD Revenue column to display the total Revenue for the FiscalYear up to and including the FiscalWeek as determined by the Drill Through filters. Those filters are Region, FiscalWeek, FiscalYear.
This is my DAX for the YTD measure:
Many thanks.
Solved! Go to Solution.
Hi @LLong
You have to keep the filter on Owner and Region. Try this measure
YTD =
CALCULATE (
SUM ( 'opportunity'[Actual Revenue (Base)] ) / 1000,
FILTER (
ALLEXCEPT ( 'opportunity', 'opportunity'[Region], 'opportunity'[Owner] ),
'opportunity'[FiscalWeek] <= MAX ( 'FiscalYearWeek'[FiscalWeek] )
),
'opportunity'[FiscalYear] = MAX ( 'FiscalYearWeek'[FiscalYear] )
)
or
YTD =
CALCULATE (
SUM ( 'opportunity'[Actual Revenue (Base)] ) / 1000,
ALLEXCEPT ( 'opportunity', 'opportunity'[Region], 'opportunity'[Owner] ),
'opportunity'[FiscalWeek] <= MAX ( 'FiscalYearWeek'[FiscalWeek] ),
'opportunity'[FiscalYear] = MAX ( 'FiscalYearWeek'[FiscalYear] )
)
Best Regards,
Jing
If this post helps, please Accept it as Solution to help other members find it. Appreciate your Kudos!
Hi @LLong
You have to keep the filter on Owner and Region. Try this measure
YTD =
CALCULATE (
SUM ( 'opportunity'[Actual Revenue (Base)] ) / 1000,
FILTER (
ALLEXCEPT ( 'opportunity', 'opportunity'[Region], 'opportunity'[Owner] ),
'opportunity'[FiscalWeek] <= MAX ( 'FiscalYearWeek'[FiscalWeek] )
),
'opportunity'[FiscalYear] = MAX ( 'FiscalYearWeek'[FiscalYear] )
)
or
YTD =
CALCULATE (
SUM ( 'opportunity'[Actual Revenue (Base)] ) / 1000,
ALLEXCEPT ( 'opportunity', 'opportunity'[Region], 'opportunity'[Owner] ),
'opportunity'[FiscalWeek] <= MAX ( 'FiscalYearWeek'[FiscalWeek] ),
'opportunity'[FiscalYear] = MAX ( 'FiscalYearWeek'[FiscalYear] )
)
Best Regards,
Jing
If this post helps, please Accept it as Solution to help other members find it. Appreciate your Kudos!
Fantastic, ALLEXCEPT is what I was missing. Thank you!
User | Count |
---|---|
77 | |
76 | |
36 | |
31 | |
29 |
User | Count |
---|---|
93 | |
79 | |
57 | |
48 | |
48 |