Forum Discussion
Count ongoing values for this year and before
- 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~
If you are unsure how to upload data please refer to https://community.fabric.microsoft.com/t5/Community-Blog/How-to-provide-sample-data-in-the-Power-BI-Forum/ba-p/963216
Thx!
Here is the sample file.
Cases - Power BI
- xifeng_L2 years ago
Super User
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~
- MickeLearnPBI2 years ago
Helper I
Great! 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 isCOUNTAX(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