Forum Discussion
Measure context issue
- Anonymous4 years ago
Hi Anonymous ,
NonContextDate = CALCULATE(MAX('TABLE1'[Context Date]),ALLSELECTED(TABLE1))ALLSELECTED will cause some problem if you use it directly. You can try ALL function or you can try this code.
Max TEST 3 = VAR _ADD = ADDCOLUMNS ( TABLE1, "NonContextDate", [NonContextDate] ) RETURN COUNTAX ( _ADD, [NonContextDate] )Result is as below.
Best Regards,
Rico ZhouIf this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Not clear what your actual issue is. What is the expected outcome?
Max TEST 3 = CALCULATE(DISTINCTCOUNT(TABLE1.FIELD1), FILTER(ALL(TABLE1), TABLE1.DateToCompare <= TABLE1.NonContextDate))- Anonymous4 years agoNot applicable
Hello lbendlin,
Thank you for your time.
Expected outcome should be for the last row 1 instead of BLANK.any
NonContextDate = CALCULATE(MAX(ContextDate), ALLSELECTED(TABLE1))
But It seems it ignored the ALLSELECTED within Max TEST 3 measure.
Regards,
Thomas
- Anonymous4 years agoNot applicable
Hi Anonymous ,
NonContextDate = CALCULATE(MAX('TABLE1'[Context Date]),ALLSELECTED(TABLE1))ALLSELECTED will cause some problem if you use it directly. You can try ALL function or you can try this code.
Max TEST 3 = VAR _ADD = ADDCOLUMNS ( TABLE1, "NonContextDate", [NonContextDate] ) RETURN COUNTAX ( _ADD, [NonContextDate] )Result is as below.
Best Regards,
Rico ZhouIf this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
- Anonymous4 years agoNot applicable
Hi Anonymous ,
NonContextDate = CALCULATE(MAX('TABLE1'[Context Date]),ALLSELECTED(TABLE1))ALLSELECTED will cause some problem if you use it directly. You can try ALL function or you can try this code.
Max TEST 3 = VAR _ADD = ADDCOLUMNS ( TABLE1, "NonContextDate", [NonContextDate] ) RETURN COUNTAX ( _ADD, [NonContextDate] )Result is as below.
Best Regards,
Rico ZhouIf this post helps, then please consider Accept it as the solution to help the other members find it more quickly.