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.
Hello experts,
Urgent request! Kindly help me! I have the following table.
Thanks in advance!
@amitchandak @johnt75 @tamerj1 @Jihwan_Kim @PaulDBrown @truptis @Ashish_Mathur @AlexisOlson @parry2k @Greg_Deckler @BA_Pete @mahoneypat @Vera_33 @Vijay_A_Verma @edhans @jennratten @smpa01 @Thingsclump @SpartaBI @MFelix @speedramps @DataInsights @Shishir22
Solved! Go to Solution.
Hi @ppdas2112 ,
Please refer to my pbix file to see if it helps you.
Create a measure.
Measure =
VAR before_three =
EDATE ( MAX ( 'Table'[date] ), -2 )
VAR _sumvalue =
CALCULATE (
SUM ( 'Table'[Spend] ),
FILTER (
ALL ( 'Table' ),
'Table'[date] >= before_three
&& 'Table'[date] <= MAX ( 'Table'[date] )
)
)
VAR _countrow =
CALCULATE (
COUNTROWS ( 'Table' ),
FILTER (
ALL ( 'Table' ),
'Table'[date] >= before_three
&& 'Table'[date] <= MAX ( 'Table'[date] )
)
)
RETURN
_sumvalue / _countrow
If I have misunderstood your meaning, please provide more details with you desired output.(Preferably in picture form)
Best Regards
Community Support Team _ Polly
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi @ppdas2112 ,
Please refer to my pbix file to see if it helps you.
Create a measure.
Measure =
VAR before_three =
EDATE ( MAX ( 'Table'[date] ), -2 )
VAR _sumvalue =
CALCULATE (
SUM ( 'Table'[Spend] ),
FILTER (
ALL ( 'Table' ),
'Table'[date] >= before_three
&& 'Table'[date] <= MAX ( 'Table'[date] )
)
)
VAR _countrow =
CALCULATE (
COUNTROWS ( 'Table' ),
FILTER (
ALL ( 'Table' ),
'Table'[date] >= before_three
&& 'Table'[date] <= MAX ( 'Table'[date] )
)
)
RETURN
_sumvalue / _countrow
If I have misunderstood your meaning, please provide more details with you desired output.(Preferably in picture form)
Best Regards
Community Support Team _ Polly
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi Ashish, that formula will take into consideration months without Spend value too
have you tried my suggested measure. If it does not give the correct result, then share the download link of your PBI file and show the expected result.
Hi,
Create a Calendar Table with calculated column formulas for Year, Month name and Month number. Sort the Month name column by Month number. Create a relationship (Many to One and Single) from the Date column of your Data Table to the Date column of the Calendar Table. To your visual, drag Year and Month name from the Calendar Table. Write these measures:
Total spend = sum(Data[Spend])
Rolling 3 month spend = averagex(summarize(filter(calendar,datesbetween(calendar,edate(min(calendar[date]),-2),max(calendar[date]))),Calendar[Year],Calendar[Month name],"ABCD",[total spend]),[abcd])
If this does not work, then share the link of your PBI file.
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 |
---|---|
114 | |
100 | |
78 | |
75 | |
50 |
User | Count |
---|---|
144 | |
109 | |
108 | |
87 | |
61 |