Join us for an expert-led overview of the tools and concepts you'll need to pass exam PL-300. The first session starts on June 11th. See you there!
Get registeredPower BI is turning 10! Let’s celebrate together with dataviz contests, interactive sessions, and giveaways. Register now.
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 |
---|---|
85 | |
79 | |
64 | |
52 | |
46 |
User | Count |
---|---|
101 | |
43 | |
41 | |
39 | |
36 |