Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

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.

Reply
Anonymous
Not applicable

Previous month card

I have a SharePoint list that is connected to my PowerBi dashboard. The list contains two columns:

 

REQUEST TYPE

Call back

Mail

In person

 

DATE

 

I want to have a card on my dashboard that lists the count of call back requests for the previous month as well as a card that lists the count of call back requests for the present month to date

 

Can someone tell me how this is done?

1 ACCEPTED SOLUTION
JorgePinho
Solution Sage
Solution Sage

 

"count of call back requests for the previous month": CALCULATE(COUNT('TableName'[RequestType]), MONTH(Date) = MONTH(Today()) - 1, 'TableName'[RequestType] = "Call back")

"count of call back requests for the present month to date": CALCULATE(COUNT('TableName'[RequestType]), MONTH(Date) = MONTH(Today()), 'TableName'[RequestType] = "Call back")

View solution in original post

3 REPLIES 3
JorgePinho
Solution Sage
Solution Sage

 

"count of call back requests for the previous month": CALCULATE(COUNT('TableName'[RequestType]), MONTH(Date) = MONTH(Today()) - 1, 'TableName'[RequestType] = "Call back")

"count of call back requests for the present month to date": CALCULATE(COUNT('TableName'[RequestType]), MONTH(Date) = MONTH(Today()), 'TableName'[RequestType] = "Call back")

Anonymous
Not applicable

Jorge,

 

This solution worked beautifully, thank you so much.  But I have one question:

 


Is it possible to add something to the formula so that when you click on these cards (ie. Click the card that says 2 Call backs last month) it filters the table to show just the Callbacks from last month?

amitchandak
Super User
Super User

@Anonymous , With help from date table, when you have selected a month on page

 

example measures

 

MTD Sales = CALCULATE(SUM(Sales[Sales Amount]),DATESMTD('Date'[Date]))
last MTD Sales = CALCULATE(SUM(Sales[Sales Amount]),DATESMTD(dateadd('Date'[Date],-1,MONTH)))
last month Sales = CALCULATE(SUM(Sales[Sales Amount]),previousmonth('Date'[Date]))

 

 

Based on today not filter

 

MTD Today =
var _min = eomonth(today(),-1)+1
var _max = today()
return
CALCULATE([Net], FILTER('Date','Date'[Date] >=_min && 'Date'[Date] <= _max))

LMTD Today=
var _min = eomonth(today(),-2)+1
var _max1 = today()
var _max = date(year(_max1),month(_max1)-1, day(_max1))
return
CALCULATE([Net], FILTER('Date','Date'[Date] >=_min && 'Date'[Date] <= _max))

 

 

This Month Today =
var _min = eomonth(today(),-1)+1
var _max = eomonth(today(),0)
return CALCULATE([Net], FILTER('Date','Date'[Date] >=_min && 'Date'[Date] <= _max))

Last Month Today =
var _min = eomonth(today(),-2)+1
var _max = eomonth(today(),-1)
return CALCULATE([Net], FILTER('Date','Date'[Date] >=_min && 'Date'[Date] <= _max))

 

 

Power BI — Month on Month with or Without Time Intelligence
https://medium.com/@amitchandak.1978/power-bi-mtd-questions-time-intelligence-3-5-64b0b4a4090e
https://www.youtube.com/watch?v=6LUBbvcxtKA

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.