Don't miss your chance to take the Fabric Data Engineer (DP-600) exam for FREE! Find out how by attending the DP-600 session on April 23rd (pacific time), live or on-demand.
Learn moreNext up in the FabCon + SQLCon recap series: The roadmap for Microsoft SQL and Maximizing Developer experiences in Fabric. All sessions are available on-demand after the live show. Register now
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?
If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.
A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.
| User | Count |
|---|---|
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |