Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.
Hello! I am looking to create a measure that calculates the difference between the count of deals closed this month and count of deals closed last month.
To get the count of deals, I am getting the distinct count of IDs.
I have a completed date field which is the date data type.
Thank you very much!
Hi,
Create a Calendar Table with calculated columns formulas for extracting Year, Month name and Month number. Sort the Month name column by the Month number column. Create a relationship from the Date column of the Data Table to the Date column of the Calendar Table. To your Table/matrix visual, drag Year and Month name from the Calendar Table. Write these measures
Deals closed = distinctcount(Data[ID])
Deals closed in previous month = calculate([Deals closed],previousmonth(Calendar[Date]))
Diff = [Deals closed]-[Deals closed in previous month]
Hope this helps.
@kristenmcnelly Maybe:
Measure =
VAR __Today = TODAY()
VAR __TMStart = DATE(YEAR(__Today),MONTH(__Today),1)
VAR __LMEnd = EOMONTH(__Today,-1)
VAR __LMStart = DATE(YEAR(__LMEnd),MONTH(__LMEnd),1)
VAR __TM = COUNTROWS(DISTINCT(SELECTCOLUMNS(FILTER('Table',[Date] <= __Today && [Date] >= __TMStart),"ID",[ID])))
VAR __LM = COUNTROWS(DISTINCT(SELECTCOLUMNS(FILTER('Table',[Date] <= __LMEnd && [Date] >= __LMStart ),"ID",[ID])))
RETURN
__TM - __LM
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
111 | |
100 | |
80 | |
64 | |
58 |
User | Count |
---|---|
148 | |
111 | |
93 | |
84 | |
66 |