Forum Discussion
snandy2011
7 years agoHelper IV
if statement not working properly
Hi all, Please consider below situation, I have one date table and i have two companies datasets as two tables. Lets Say, company A and company B so, company A data look like date ...
- 7 years ago
HI, snandy2011
You need to use "all" Functions in your formula:
IF ( VALUES ( 'Date Table'[MonthName] ) = "March", CALCULATE ( [total session], FILTER ( ALL ( 'Date Table' ), 'Date Table'[MonthName] = "May" ) ), IF ( VALUES ( 'Date Table'[MonthName] ) = "April", CALCULATE ( [total session], FILTER ( ALL ( 'Date Table' ), 'Date Table'[MonthName] = "June" ) ) ) )Best Regards,
Lin
v-lili6-msft
7 years agoCommunity Support
HI, snandy2011
You need to use "all" Functions in your formula:
IF (
VALUES ( 'Date Table'[MonthName] ) = "March",
CALCULATE (
[total session],
FILTER ( ALL ( 'Date Table' ), 'Date Table'[MonthName] = "May" )
),
IF (
VALUES ( 'Date Table'[MonthName] ) = "April",
CALCULATE (
[total session],
FILTER ( ALL ( 'Date Table' ), 'Date Table'[MonthName] = "June" )
)
)
)
Best Regards,
Lin
snandy2011
7 years agoHelper IV
Hi v-lili6-msft ,
Thanks for your replying..After trying lot of, i achieved by Allselected. yes , with all function, it also works,
Thanks for your solution..