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.
Hi Guys.
I have the following formulas:
What I am after is how can I roll the total of Total_V2. For example, I would like Jan to be 695, Feb to be 695*2, Mar to be 695*3 and so on.
Is there any way I can apply a rolling DAX Calculation to any of the measures?
Solved! Go to Solution.
Hi @azakir ,
You can try the following dax.
MEASURE =
VAR _monthnumber =
MONTH ( MAX ( 'DateDim'[Date] ) )
VAR CurrentDate =
MAX ( DateDim[Date] )
VAR _sum =
CALCULATE (
[Waste To Landfill Graph2_V1],
FILTER (
ALL ( DateDim ),
DateDim[Date] <= CurrentDate
&& DateDim[Previous Year] = 1
)
)
VAR _round =
ROUNDDOWN ( _sum, 0 )
RETURN
_round * _monthnumber
Best Regards,
Liu Yang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi @azakir ,
You can try the following dax.
MEASURE =
VAR _monthnumber =
MONTH ( MAX ( 'DateDim'[Date] ) )
VAR CurrentDate =
MAX ( DateDim[Date] )
VAR _sum =
CALCULATE (
[Waste To Landfill Graph2_V1],
FILTER (
ALL ( DateDim ),
DateDim[Date] <= CurrentDate
&& DateDim[Previous Year] = 1
)
)
VAR _round =
ROUNDDOWN ( _sum, 0 )
RETURN
_round * _monthnumber
Best Regards,
Liu Yang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi,
What are you trying to achieve? Why should Feb be 695.06*2 and so on?
Hi @Ashish_Mathur . Thanks for the reply. What I am trying to achieve is the total 695 being rolled up every month. So the requirement is whatever the total was last year (695 in this case) make it a target for this year with every month being rolled up by the same total.
Share the download link of the PBI file.
You already are getting the correct result via the Total_V3 measure. What help do you need?
If you notice, I am just multiplying it by the month number. I was wondering if there is a more efficient way to use a rolling DAX measure.
Hi,
File deleted from the link you shared earlier.
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
97 | |
97 | |
82 | |
74 | |
66 |
User | Count |
---|---|
121 | |
105 | |
102 | |
82 | |
72 |