- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Cumulative Distinct count based on months
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.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
@Vamshi2020 , with two dates to me it seem like a case like my HR blog current employee.
At the Microsoft Analytics Community Conference, global leaders and influential voices are stepping up to share their knowledge and help you master the latest in Microsoft Fabric, Copilot, and Purview. ✨
️ November 12th-14th, 2024
Online Event
Register Here
Helpful resources
Join us at the Microsoft Fabric Community Conference
March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!
Power BI Monthly Update - January 2025
Check out the January 2025 Power BI update to learn about new features in Reporting, Modeling, and Data Connectivity.
Subject | Author | Posted | |
---|---|---|---|
09-09-2024 01:01 AM | |||
Anonymous
| 01-08-2024 01:34 PM | ||
05-30-2024 07:10 AM | |||
07-25-2024 03:49 PM | |||
11-29-2024 02:03 AM |
User | Count |
---|---|
102 | |
74 | |
42 | |
39 | |
30 |
User | Count |
---|---|
161 | |
87 | |
64 | |
46 | |
42 |