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.
My formula below works properly for customers that have Revenue > 0 in all 11 months between Jan 1 2018 and Nov 30 2018. I am dividing by 11 (highlighted in red below).
Solved! Go to Solution.
Hello @Anonymous
You can use some variables and filters in your measure to get the count of the number of months where the revenue <> 0 for each customer.
AvgRevenueJanNov = VAR Jan = DATE ( 2018, 1, 1 ) VAR Nov = DATE ( 2018, 11, 30 ) VAR RowCount = CALCULATE ( COUNTROWS ( VALUES ( CustomerMargin[Date] ) ), DATESBETWEEN ( CustomerMargin[Date], Jan, Nov ), CustomerMargin[Revenue] <> 0 ) RETURN DIVIDE ( CALCULATE ( SUM ( CustomerMargin[Revenue] ), DATESBETWEEN ( CustomerMargin[Date], Jan, Nov ) ), RowCount, 0 )
Hello @Anonymous
You can use some variables and filters in your measure to get the count of the number of months where the revenue <> 0 for each customer.
AvgRevenueJanNov = VAR Jan = DATE ( 2018, 1, 1 ) VAR Nov = DATE ( 2018, 11, 30 ) VAR RowCount = CALCULATE ( COUNTROWS ( VALUES ( CustomerMargin[Date] ) ), DATESBETWEEN ( CustomerMargin[Date], Jan, Nov ), CustomerMargin[Revenue] <> 0 ) RETURN DIVIDE ( CALCULATE ( SUM ( CustomerMargin[Revenue] ), DATESBETWEEN ( CustomerMargin[Date], Jan, Nov ) ), RowCount, 0 )
User | Count |
---|---|
85 | |
80 | |
75 | |
49 | |
41 |
User | Count |
---|---|
114 | |
56 | |
51 | |
42 | |
42 |