Join us for an expert-led overview of the tools and concepts you'll need to pass exam PL-300. The first session starts on June 11th. See you there!
Get registeredPower BI is turning 10! Let’s celebrate together with dataviz contests, interactive sessions, and giveaways. Register now.
Hello,
Can we mention any random month name in DATESMTD function for which we can calculate total sales?
Please suggest.
Thanks in Advance.
Ya we can add , Try like this it will help u i hope so,
Measure = CALCULATE(Sum (Sales), DATESMTD(DATEADD(calender[Date],2,MONTH))))
Try this, here i was added two more month in my Current date.
Thanks Baskar, for the example.
Measure = CALCULATE(Sum (Sales), DATESMTD(DATEADD(calender[Date],2,MONTH))))
But I need to mention any random month name. Here, we see that it is adding 2 months to the current month.
And while calculation, I wouldn't be knowing the relevance i.e. how many months it is before or after current month.
e.g. User selects May 2016 and that should be passed in the DAX to calculate total sales in May.
Please suggest.
Cool dude,
see basically dax work with your case only.
If u select "MOnthname " in slicer it will show only may month sales know ?
Calculate(Sum(Sales))
Okay thanks.
Just another question:
Will DATESYTD function work in the same way?
I mean if I select May in slicer, then will that give total starting from current fiscal year till May only?
@techiebee wrote:
Okay thanks.
Just another question:
Will DATESYTD function work in the same way?
I mean if I select May in slicer, then will that give total starting from current fiscal year till May only?
Slicer is not working that way, though you can use an expression like MAX(dateUsedInSlicer) to get a selected date though. What is the point of the "random" month? You could specify a date range in the slicer and the DATESYTD would work accordingly.
This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.
Check out the June 2025 Power BI update to learn about new features.
User | Count |
---|---|
84 | |
75 | |
68 | |
41 | |
35 |
User | Count |
---|---|
107 | |
56 | |
52 | |
48 | |
40 |