Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.
Hello, I have a measure that calculates the number of vulnerabilities that appeared during a month but I need a measure that shows me these same values but from the previous month, that is, if I select the month of April, the number that lists me is the number of the month of March,
That in the month of February it marks 5,682, in March 865 and in April 532
Can anyone help me?
Thank you
Hi, @Syndicate_Admin
Maybe you can create new measure and try the following DAX
Vulnerabilities_Previous_Month =
CALCULATE(
SUM('Table'[Vulnerabilidades_Totales]),
DATEADD('Table'[Mes], -1, MONTH)
)
How to Get Your Question Answered Quickly
If it does not help, please provide more details with your desired output and pbix file without privacy information (or some sample data)
Best Regards
Yongkang Hua
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
@Syndicate_Admin , You can use time intelligence, both for that both month year need to be in context
You should use a date table joined with the date of your table. The field from date table should be used in a filter, slicer, measure, and visual
Have measure with all filters other than date, say M1
and then have measures like
MTD Sales = CALCULATE([M1],DATESMTD('Date'[Date]))
last MTD Sales = CALCULATE([M1],DATESMTD(dateadd('Date'[Date],-1,MONTH)))
last month Sales = CALCULATE([M1],previousmonth('Date'[Date]))
MTD Sales = CALCULATE([M1],DATESMTD('Date'[Date]))
last MTD Sales = CALCULATE([M1],DATESMTD(dateadd('Date'[Date],-1,MONTH)))
last month Sales = CALCULATE([M1],previousmonth('Date'[Date]))
next month Sales = CALCULATE([M1],nextmonth('Date'[Date]))
this month = CALCULATE([M1],DATESMTD(ENDOFMONTH('Date'[Date])))
last MTD (complete) Sales = CALCULATE([M1],DATESMTD(ENDOFMONTH(dateadd('Date'[Date],-1,MONTH))))
previous month value = CALCULATE([M1],previousmonth('Date'[Date]))
last year last month = CALCULATE([M1],DATESMTD(dateadd('Date'[Date],-1*month(Today()),MONTH)))
Time Intelligence, Part of learn Power BI https://youtu.be/cN8AO3_vmlY?t=27510
Time Intelligence, DATESMTD, DATESQTD, DATESYTD, Week On Week, Week Till Date, Custom Period on Period,
Custom Period till date: https://youtu.be/aU2aKbnHuWs&t=145s
User | Count |
---|---|
93 | |
84 | |
78 | |
75 | |
66 |
User | Count |
---|---|
115 | |
105 | |
93 | |
65 | |
60 |