Forum Discussion
Gross + If
- 4 years ago
Hi netanel ,
You can try below code:-
Gross USD = IF ( SELECTEDVALUE ( 'Table'[Source] ) = "Amn", CALCULATE ( DIVIDE ( ( SUM ( 'DB 2021'[Gross USD] ) + SUM ( 'DB 2021'[Fee] ) ), COUNTROWS ( 'Date' ) ), KEEPFILTERS ( 'Date'[Date] < TODAY () ) ), CALCULATE ( DIVIDE ( SUM ( 'DB 2021'[Gross USD] ), COUNTROWS ( 'Date' ) ), KEEPFILTERS ( 'Date'[Date] < TODAY () ) ) )Thanks,
Samarth
Hi,
You can include IF to your Fee measure. So something like this
Measure = IF(SELECTEDVALUE('Table'[Source])<>"Amn",BLANK(),[FEE])
With this the measure will display blank if the Source is something besides Amn. I hope this helps and if it does consider accepting this as a solution and giving the post a thumbs up!
- netanel4 years ago
Post Prodigy
Hi ValtteriN
I'm really getting close to the result in the idea you proposed
Only at the end of the formula:
Measure = IF (SELECTEDVALUE ('Table' [Source]) <> "Amn", BLANK (), [FEE])What is marked in pink is a column in a table and not a formula
How to bring it?- ValtteriN4 years ago
Community Champion
Hi,
Then you can just use the same logic with that column:
Measure = IF (SELECTEDVALUE ('Table' [Source]) <> "Amn", BLANK (), SELECTEDVALUE('Table'[FEE]))