Forum Discussion
DAX Measure/Column Help
- 3 years ago
see attached
there will be Year slicer in the page from Year-Factor table and user will be choosing the year
For that to work the Year-Factor table must be disconnected.
Your expected output is unclear for products that fall outside the limits. Please indicate the expected outcome for all products and Year-Filter selections.
- arsene493 years agoHelper I
lbendlin Thanks for the reply. i have added a table at the end of the question which shows the expected output when each value of the Year-Factor slicer is selected. let me know if you need any further information.
- arsene493 years agoHelper I
lbendlin i have added expected outcome for all products and Year-Filter selections. did you get chance to look?
- lbendlin3 years agoSuper User
Adjusted =
VAR yf =
SELECTEDVALUE ( 'Year-Factor'[Year] )
VAR a =
SUMMARIZE (
'Fact',
[Product],
[Year],
"sm",
VAR y = [Year]
RETURN
SUM ( 'Fact'[Price] )
* IF (
yf = "None",
1,
COALESCE (
CALCULATE (
PRODUCTX ( 'Year-Factor', [Factor] ),
'Year-Factor'[Year] <= yf,
'Year-Factor'[Year] > y
),
1
)
)
)
RETURN
SUMX ( a, [sm] )See attached