Forum Discussion
Equivalent of Tableau Function: Window_sum()
Dear all,
I am using the following tableau formula:
WINDOW_SUM(SUM([Backlog]]), -11, 0)/WINDOW_SUM(COUNT([Backlog]]), -11, 0)
I need to convert this formula in power bi.
Thanks in advance for help
- Anonymous3 years ago
Hi Shantanuj ,
The equivalent formula in Power BI would be:
for_ = DIVIDE ( CALCULATE ( SUM ( [Backlog] ), DATESINPERIOD ( 'Table'[Date], LASTDATE ( 'Table'[Date] ), -11, MONTH ) ), CALCULATE ( COUNT ( [Backlog] ), DATESINPERIOD ( 'Table'[Date], LASTDATE ( 'Table'[Date] ), -11, MONTH ) ) )This formula uses the DATESINPERIOD function to calculate the sum and count of the [Backlog] measure over the last 11 months. The DIVIDE function is then used to divide the sum by the count.
How to Get Your Question Answered Quickly
If it does not help, please provide more details with your desired output and pbix file without privacy information (or some sample data) .
Best Regards
Community Support Team _ RongtieIf this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
1 Reply
- AnonymousNot applicable
Hi Shantanuj ,
The equivalent formula in Power BI would be:
for_ = DIVIDE ( CALCULATE ( SUM ( [Backlog] ), DATESINPERIOD ( 'Table'[Date], LASTDATE ( 'Table'[Date] ), -11, MONTH ) ), CALCULATE ( COUNT ( [Backlog] ), DATESINPERIOD ( 'Table'[Date], LASTDATE ( 'Table'[Date] ), -11, MONTH ) ) )This formula uses the DATESINPERIOD function to calculate the sum and count of the [Backlog] measure over the last 11 months. The DIVIDE function is then used to divide the sum by the count.
How to Get Your Question Answered Quickly
If it does not help, please provide more details with your desired output and pbix file without privacy information (or some sample data) .
Best Regards
Community Support Team _ RongtieIf this post helps, then please consider Accept it as the solution to help the other members find it more quickly.