Don't miss your chance to take the Fabric Data Engineer (DP-600) exam for FREE! Find out how by attending the DP-600 session on April 23rd (pacific time), live or on-demand.
Learn moreNext up in the FabCon + SQLCon recap series: The roadmap for Microsoft SQL and Maximizing Developer experiences in Fabric. All sessions are available on-demand after the live show. Register now
Curious, there is PREVIOUSMONTH() and NEXTMONTH(), how come there isn't CURRENTMONTH()?
Solved! Go to Solution.
Figured it out:
Revenue MTD = CALCULATE(SUM('GA Ecommerce'[Revenue]),PARALLELPERIOD('GA Ecommerce'[Date],0,MONTH))
There's a DATESMTD() - is that what you're looking for?
https://msdn.microsoft.com/en-us/library/ee634359.aspx
I'm trying to calculate the monthly average order size in dollars. My data is listed in daily format. When I create a chart I can add my data and select average and it will display the average daily data nicely. The problem is once you are looking for a weekly or monthly average you end up getting an average of all the daily averages which is close but incorrect.
Revenue MTD = CALCULATE(SUM('GA Ecommerce'[Revenue]),DATEADD('GA Ecommerce'[Date],0,MONTH)) gives me daily revenue
Revenue MTD = CALCULATE(SUM('GA Ecommerce'[Revenue]),MONTH('GA Ecommerce'[Date])) gives me the all time total
Revenue MTD = CALCULATE(SUM('GA Ecommerce'[Revenue]),DATESMTD('GA Ecommerce'[Date])) gives me daily MTD
Previous Month = CALCULATE(SUM('GA Ecommerce'[Revenue]),PREVIOUSMONTH('GA Ecommerce'[Date])) and
Next Month = CALCULATE(SUM('GA Ecommerce'[Revenue]),NEXTMONTH('GA Ecommerce'[Date])) give me exactly what I want but for the wrong month.
Its:
MONTH(TODAY())
MONTH(TODAY()) would give me this month, what about every month?
Figured it out:
Revenue MTD = CALCULATE(SUM('GA Ecommerce'[Revenue]),PARALLELPERIOD('GA Ecommerce'[Date],0,MONTH))
thanks.. that really helped
Been driving me nuts.
This should really be a standard function though.
That's a much more elegant solution. I didn't realize your situation and thought you just needed a singular value for a clacluated column or something. Glad you figured it out.
If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.
A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.
Experience the highlights from FabCon & SQLCon, available live and on-demand starting April 14th.
| User | Count |
|---|---|
| 47 | |
| 43 | |
| 40 | |
| 20 | |
| 15 |
| User | Count |
|---|---|
| 70 | |
| 67 | |
| 32 | |
| 27 | |
| 25 |