The ultimate Fabric, Power BI, SQL, and AI community-led learning event. Save €200 with code FABCOMM.
Get registeredCompete to become Power BI Data Viz World Champion! First round ends August 18th. Get started.
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 only looks at, for example, the year 2023, but I want it to also include previous years' ongoing cases. For example, the case may have started on 2022-12-31, and then it may still be ongoing and should be included in future counts.
I am a little lost right now and hope for assistance in this.
Solved! Go to Solution.
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~
Since you didn't provide example data, I can only give a rough result, just for reference.
Measure = COUNTAX(FILTER(ALL(Cases),Case[Date]<=MAX(Slicer[Date])),[Ongoing])
Did I answer your question? If yes, pls mark my post as a solution and appreciate your Kudos !
Thank you~
Can I add a file here?
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-...
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~
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 is
Since the ALL function ignores any filters, it needs to be contextualized to decide on a solution
User | Count |
---|---|
24 | |
9 | |
8 | |
7 | |
6 |
User | Count |
---|---|
29 | |
13 | |
11 | |
10 | |
9 |