- 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

Logic and Visualization for Current Month vs Previous month's trend analysis
Hi Team,
I have the data of customers for 6 months(Jan - Jun) where I have to show the comparison for Current month (June) vs Previous months (January - May). How can I create this logic to compare total number of customers for above comparison?
also please suggest some visuals.
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content

HI @Anshu_Joshi,
It sounds like a common rolling aggregate calculate requirements. For this scenario, I you can extract the current date to store in variable. Then you can use that variable with date function to get result and as condition in expression to filter and limit the calculation ranges.
formula =
VAR currDate =
MAX ( Table[Date] )
RETURN
CALCULATE (
SUM ( Table[Value] ),
FILTER (
ALLSELECTED ( Table ),
[Date]
>= DATE ( YEAR ( currDate ), MONTH ( currDate ) - 5, DAY ( currDate ) )
&& [Date] <= currDate
)
)
Regards,
Xiaoxin Sheng
If this post helps, please consider accept as solution to help other members find it more quickly.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content

HI @Anshu_Joshi,
It sounds like a common rolling aggregate calculate requirements. For this scenario, I you can extract the current date to store in variable. Then you can use that variable with date function to get result and as condition in expression to filter and limit the calculation ranges.
formula =
VAR currDate =
MAX ( Table[Date] )
RETURN
CALCULATE (
SUM ( Table[Value] ),
FILTER (
ALLSELECTED ( Table ),
[Date]
>= DATE ( YEAR ( currDate ), MONTH ( currDate ) - 5, DAY ( currDate ) )
&& [Date] <= currDate
)
)
Regards,
Xiaoxin Sheng
If this post helps, please consider accept as solution to help other members find it more quickly.

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 - February 2025
Check out the February 2025 Power BI update to learn about new features.

Subject | Author | Posted | |
---|---|---|---|
07-10-2024 03:57 AM | |||
08-30-2024 11:11 AM | |||
09-17-2024 02:24 AM | |||
07-05-2024 07:20 AM | |||
09-05-2024 01:07 PM |
User | Count |
---|---|
87 | |
81 | |
53 | |
38 | |
35 |