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
Marcus_E
Helper I
Helper I

Measure to return current month transactions

Hi

 

Hoping someone can point me in the right direction with a measure I'm struggling with. I have a series of transactions which (for simplicity sake) consist of a value ($) and transaction date. Instead of summing the value of all the transactions per month, I need to list each transaction row by row for the current month.

 

Keen to do this using a measure which will automatically filter transactions for the current month rather than relying on a slicer to make it simpler for the end user. I've tried using the DATESMTD but can't seem to get it to return the individual transaction details for the current month only.

 

The output is simple but I'm struggling to get it to list each transaction rather than summing. Output example below:

 

Transaction value                     Transaction Month

$80                                              Sep 20 

$90                                              Sep 20 

$100                                            Sep 20

$60                                              Sep 20

$110                                            Sep 20

$120                                            Sep 20

1 ACCEPTED SOLUTION
amitchandak
Super User
Super User

@Marcus_E , Based on what I got. You need to have a column like this you date table and filter the current month

 

Month Type = Switch( True(),
Date([Date]) = eomonth(Today(),-1),"Last Month" , //Last Month
Date([Date])= eomonth(Today(),0),"This Month" , //This Month
[Month Year]
)

 

Sort this column on month year

View solution in original post

3 REPLIES 3
v-easonf-msft
Community Support
Community Support

Hi , @Marcus_E 

If you just want to get the data of current month.Maybe you can try to create relative  date range filter   .

 

77.png

Best Regards,
Community Support Team _ Eason

amitchandak
Super User
Super User

@Marcus_E , Based on what I got. You need to have a column like this you date table and filter the current month

 

Month Type = Switch( True(),
Date([Date]) = eomonth(Today(),-1),"Last Month" , //Last Month
Date([Date])= eomonth(Today(),0),"This Month" , //This Month
[Month Year]
)

 

Sort this column on month year

Thank you @amitchandak that works as required.

 

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.