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!To celebrate FabCon Vienna, we are offering 50% off select exams. Ends October 3rd. Request your discount now.
Hi Everyone ,
I have a Requirement to show Cumulative count based on "Month -Year" in Line chart . Based on selections in Dim Date slicer, my value should change . My Actual count formula is :
Count=
var a=MINX(DimDate,DimDate[Date])
var b=MAXX(DimDate,DimDate[Date])
var c=calculate(Distinctcount(MemberTable[MemberId]),Filter(MemberTable , MemberTable[StartDate]<=b && MemberTable[EndDate]>=a))
return c
The above formula is giving the proper results, but in other line chart i want to see cumulative count for each months.
So i wrote like below:
Cumulative =Calculate(MemberTable[Count],DATESYTD(DimDate[Date],"31/12")
But this is not working ,
Please help me with the requirement .
TIA
Solved! Go to Solution.
Hi @Vamshi2020 ,
Try this:
Cumulative Count =
VAR a =
MINX ( ALLSELECTED ( DimDate ), DimDate[Date] )
VAR b =
MAXX ( DimDate, DimDate[Date] )
VAR c =
CALCULATE (
DISTINCTCOUNT ( MemberTable[MemberId] ),
FILTER ( MemberTable, MemberTable[StartDate] <= b && MemberTable[EndDate] >= a )
)
RETURN
c
Best regards
Icey
If this post helps, then consider Accepting it as the solution to help other members find it faster.
Hi @Vamshi2020 ,
Try this:
Cumulative Count =
VAR a =
MINX ( ALLSELECTED ( DimDate ), DimDate[Date] )
VAR b =
MAXX ( DimDate, DimDate[Date] )
VAR c =
CALCULATE (
DISTINCTCOUNT ( MemberTable[MemberId] ),
FILTER ( MemberTable, MemberTable[StartDate] <= b && MemberTable[EndDate] >= a )
)
RETURN
c
Best regards
Icey
If this post helps, then consider Accepting it as the solution to help other members find it faster.
@Vamshi2020 , with two dates to me it seem like a case like my HR blog current employee.
User | Count |
---|---|
98 | |
76 | |
74 | |
50 | |
27 |