Check your eligibility for this 50% exam voucher offer and join us for free live learning sessions to get prepared for Exam DP-700.
Get StartedDon't miss out! 2025 Microsoft Fabric Community Conference, March 31 - April 2, Las Vegas, Nevada. Use code MSCUST for a $150 discount. Prices go up February 11th. Register now.
Hi,
Month
Mar
Apr
May
June
july
i want to split in to below:
Current month Previous month
July June
Please help on this issue.
Regards,
Solved! Go to Solution.
Hi @Anonymous,
I think you can add a calculated column to convert raw month fields and calculate the previous month to achieve your requirement.
Previous =
VAR curr =
DATEVALUE ( [Month] & "/1" )
RETURN
FORMAT ( DATE ( YEAR ( curr ), MONTH ( curr ) - 1, 1 ), "mmm" )
Regards,
Xiaoxin Sheng
Can I ask what is the context behing your request? are you summarizing data in rows underneath it or just want previous month?
@Anonymous , try like
, Try like. You need two date table, both have month year in that. Keep slicer from each one .
measure1 =
var _min = minX(allselected(Date,Date[Date]))
var _max = manX(allselected(Date,Date[Date]))
return
calculate(sum(Table[Sales]), filter(Table,Table[Date]>=_min && Table[Date]<=_max))
Use the crossfilter is Date is joined and active.
measure2 =
var _min = minX(allselected(Date1,Date1[Date]))
var _max = manX(allselected(Date1,Date1[Date]))
return
calculate(sum(Table[Sales]), filter(Table,Table[Date]>=_min && Table[Date]<=_max))
//calculate(sum(Table[Sales]), filter(Table,Table[Date]>=_min && Table[Date]<=_max), crossfilter(Table[Date],Date[Date],none))
Hi @Anonymous,
I think you can add a calculated column to convert raw month fields and calculate the previous month to achieve your requirement.
Previous =
VAR curr =
DATEVALUE ( [Month] & "/1" )
RETURN
FORMAT ( DATE ( YEAR ( curr ), MONTH ( curr ) - 1, 1 ), "mmm" )
Regards,
Xiaoxin Sheng
@Anonymous not sure the purpose but you should be using time intelligence function using date table in your model, in this case, you can use previousmonth function to get the previous month. Add date dimension in your model and use it for and time intelligence calculations. Once the date dimension is added, mark it as a date table on table tools.
https://perytus.com/2020/05/22/create-a-basic-date-table-in-your-data-model-for-time-intelligence-calculations/
I would ❤ Kudos if my solution helped. 👉 If you can spend time posting the question, you can also make efforts to give Kudos whoever helped to solve your problem. It is a token of appreciation!
⚡Visit us at https://perytus.com, your one-stop-shop for Power BI-related projects/training/consultancy.⚡
Subscribe to the @PowerBIHowTo YT channel for an upcoming video on List and Record functions in Power Query!!
Learn Power BI and Fabric - subscribe to our YT channel - Click here: @PowerBIHowTo
If my solution proved useful, I'd be delighted to receive Kudos. When you put effort into asking a question, it's equally thoughtful to acknowledge and give Kudos to the individual who helped you solve the problem. It's a small gesture that shows appreciation and encouragement! ❤
Did I answer your question? Mark my post as a solution. Proud to be a Super User! Appreciate your Kudos 🙂
Feel free to email me with any of your BI needs.
March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!
Check out the January 2025 Power BI update to learn about new features in Reporting, Modeling, and Data Connectivity.
User | Count |
---|---|
133 | |
76 | |
53 | |
38 | |
37 |
User | Count |
---|---|
202 | |
80 | |
71 | |
55 | |
48 |