Forum Discussion
netanel
Post Prodigy
4 years agoGross + if
Hi All! I have a formula that I can not put together correctly This is the first part of the formula that works great for me: Gross USD average per Day = CALCULATE( DIVIDE( SUM( 'DB 20...
- 4 years ago
Thank you all!
This is the correct formula:Gross USD =IF (SELECTEDVALUE ( 'db 2021'[Source] ) = "Amazon",CALCULATE (DIVIDE (( SUM ( 'DB 2021'[Gross USD] ) + SUM ( 'DB 2021'[Fee USD] ) ),COUNTROWS ( 'Date' )),KEEPFILTERS ( 'Date'[Date] < TODAY () )),CALCULATE (DIVIDE ( SUM ( 'DB 2021'[Gross USD] ), COUNTROWS ( 'Date' ) ),KEEPFILTERS ( 'Date'[Date] < TODAY () )))
netanel
Post Prodigy
4 years agoThank you all!
This is the correct formula:
Gross USD =
IF (
SELECTEDVALUE ( 'db 2021'[Source] ) = "Amazon",
CALCULATE (
DIVIDE (
( SUM ( 'DB 2021'[Gross USD] ) + SUM ( 'DB 2021'[Fee USD] ) ),
COUNTROWS ( 'Date' )
),
KEEPFILTERS ( 'Date'[Date] < TODAY () )
),
CALCULATE (
DIVIDE ( SUM ( 'DB 2021'[Gross USD] ), COUNTROWS ( 'Date' ) ),
KEEPFILTERS ( 'Date'[Date] < TODAY () )
)
)