Forum Discussion
Help in DAX
- Anonymous1 year ago
Hi Basava
Thanks for the reply from bhanu_gautam .
Basava , if you want to display dynamically, you need to create a measure. The following test is for your reference, there is no relationship between the two tables.
Measure:
Measure = VAR _selected = SELECTEDVALUE(B[Reported Date]) VAR _Is = CALCULATE(MAX(A[W/H]), FILTER(A, [Created Date] = _selected)) VAR _P1 = _selected - 1 VAR _P2 = _selected - 2 VAR _result = IF(_Is = "Holiday" || WEEKDAY(MAX('A'[Created Date]), 2) = 1, CALCULATE(COUNT(A[Count]), FILTER(A, [Created Date] < _selected && [Created Date] >= _P2)), CALCULATE(COUNT(A[Count]), FILTER(A, [Created Date] < _selected && [Created Date] >= _P1))) RETURN _resultOutput:
If you still have questions, please let me know.
Best Regards,
Yulia XuIf this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi Basava
Thanks for the reply from bhanu_gautam .
Basava , if you want to display dynamically, you need to create a measure. The following test is for your reference, there is no relationship between the two tables.
Measure:
Measure =
VAR _selected = SELECTEDVALUE(B[Reported Date])
VAR _Is = CALCULATE(MAX(A[W/H]), FILTER(A, [Created Date] = _selected))
VAR _P1 = _selected - 1
VAR _P2 = _selected - 2
VAR _result = IF(_Is = "Holiday" || WEEKDAY(MAX('A'[Created Date]), 2) = 1, CALCULATE(COUNT(A[Count]), FILTER(A, [Created Date] < _selected && [Created Date] >= _P2)), CALCULATE(COUNT(A[Count]), FILTER(A, [Created Date] < _selected && [Created Date] >= _P1)))
RETURN
_result
Output:
If you still have questions, please let me know.
Best Regards,
Yulia Xu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.