Power BI is turning 10! Tune in for a special live episode on July 24 with behind-the-scenes stories, product evolution highlights, and a sneak peek at what’s in store for the future.
Save the dateEnhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.
Hello fellow bi collegues,
I'm struggling to define a dax measure that would return the number of issues (I work with azure devops data) for the previous month only; kinda fixed context in the measure, what I did so far is:
!totClosedLastMonth = CALCULATE([!workItemCount],fact_devops[WorkItemType]="Issue",fact_devops[State]="Closed",DATEADD(dim_date[Date],-1,MONTH),USERELATIONSHIP(dim_date[Date],fact_devops[DATEKEYCLOSED]))
and it works but it requires to enforce context somewhere in filters, I'd like that measure to return a fixed value for the previous month comparing to the current one. How to do that?
Yes, I want a filter context (report level) to be fixed and restricted for current and previous month (given report display time by a report user) only - without letting user to get back deeper in the past. Not neccesairly want this to change every month and I already did that using variables and defining current and previous months using EOMONTH and TODAY functions.
@lbendlin Thanks for your contribution on this thread.
Hi @binoobie ,
I still don't understand what your needs are? Could you please clarify your requirements? Are you attempting to calculate the difference between the current month’s value and the previous month’s value? If possible, providing sample data with Text format and practical examples would greatly assist in understanding your logic and desired outcome. It would be helpful to find out the solution. You can refer the following link to share the required info:
How to provide sample data in the Power BI Forum
Best Regards
I'd like that measure to return a fixed value for the previous month comparing to the current one.
The interpretation of "current month" and "previous month" depends on the filter context. If you hard code that then you have to change your report design every month, Surely you don't want that?
Check out the July 2025 Power BI update to learn about new features.
This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.
User | Count |
---|---|
7 | |
7 | |
3 | |
2 | |
2 |
User | Count |
---|---|
6 | |
5 | |
4 | |
4 | |
4 |