Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.
Register now!Learn from the best! Meet the four finalists headed to the FINALS of the Power BI Dataviz World Championships! Register now
Hi,
My code below is now counting the no of incidents in the current FY just started (01/04/2023 - 31/03/2024)
How can amend the code below to give me the DistinctCount for 01/04/2022 - 31/03/2023?
YTD Closed = CALCULATE(
TOTALYTD(DISTINCTCOUNT('Closed Cases'[incidentid]),
'Closed Cases'[pre_resolutiondate],"31/03"),
FILTER('Closed Cases', 'Closed Cases'[tpo_complexvuddycase] = FALSE()))
Thanks,
Solved! Go to Solution.
hello,
try this : calculate([YTD Closed],datesytd(calendar'date,-1,year))
sincerely
@ArchStanton Might be able to get there with PARALLELPERIOD but DAX's time intelligence functions aren't great with fiscal years. If you don't have any helper columns or anything, you could simply do this:
PYTD Closed =
VAR __Begin = DATE(2022,1,4)
VAR __End = DATE(2023,3,31)
VAR __Table = DISTINCT(SELECTCOLUMNS(FILTER('Closed Cases', [tpo_complexvuddycase] = FALSE() && [pre-resolutiondate] >= __Begin && [pre-resolutiondate] <= __End),"incidentid",[incidentid]))
VAR __Result = COUNTROWS(__Table)
RETURN
__Result
Thanks,
I think I've got there with this but it always good to have alternatives, more than 1 way to skin a cat!
22/23 Closed = CALCULATE(
DISTINCTCOUNT('Closed Cases'[incidentid]),
DATESBETWEEN('Closed Cases'[pre_resolutiondate], "01/04/2022", "31/03/2023"),
'Closed Cases'[tpo_complexvuddycase] = FALSE())
hello,
try this : calculate([YTD Closed],datesytd(calendar'date,-1,year))
sincerely
Thanks! much appreciated
Share feedback directly with Fabric product managers, participate in targeted research studies and influence the Fabric roadmap.
Check out the February 2026 Power BI update to learn about new features.
| User | Count |
|---|---|
| 50 | |
| 49 | |
| 35 | |
| 15 | |
| 14 |
| User | Count |
|---|---|
| 92 | |
| 75 | |
| 41 | |
| 26 | |
| 25 |