Forum Discussion
MickeLearnPBI
Helper I
2 years agoCount ongoing values for this year and before
I have created a column that brings up the number of ongoing cases, using True (which is the Ongoing column) Measurement value = COUNTAX(ALLSELECTED(Cases), [Ongoing]) +0 When I use my slicer, it ...
- 2 years ago
You can try below two measurre.
Ongoing cases = CALCULATE(COUNT('Executions'[ExecutionID]),'Calender'[Date]<=MAX('Calender'[Date]),'Executions'[Ongoing case]="TRUE") Ongoing cases 2 = COUNTAX(FILTER(ALL(Executions),Executions[ExecutionStartDate]<=MAX(Calender[Date])),[Ongoing case])Did I answer your question? If yes, pls mark my post as a solution and appreciate your Kudos !
Thank you~
xifeng_L
Super User
2 years ago
You can try below two measurre.
Ongoing cases = CALCULATE(COUNT('Executions'[ExecutionID]),'Calender'[Date]<=MAX('Calender'[Date]),'Executions'[Ongoing case]="TRUE")
Ongoing cases 2 = COUNTAX(FILTER(ALL(Executions),Executions[ExecutionStartDate]<=MAX(Calender[Date])),[Ongoing case])
Did I answer your question? If yes, pls mark my post as a solution and appreciate your Kudos !
Thank you~
MickeLearnPBI
Helper I
2 years agoGreat! That worked!
One last question:
Can the result be adjusted according to another slicer that I have belonging to the same table (Executions) with column (TypeOfCase).
The dax form I use today is
COUNTAX(ALL(Executions), [Ongoing case]) +0
- xifeng_L2 years ago
Super User
Since the ALL function ignores any filters, it needs to be contextualized to decide on a solution