Forum Discussion
Lookup Value and return
- 5 years ago
Hi gaurav-narchal ,
Because your file cannot be opened here, so I create a simple example to calculate the Invoice level ; and create a measure as follows:
level = VAR _count = CALCULATE ( DISTINCTCOUNT ( 'Table'[Exchange] ), ALLEXCEPT ( 'Table', 'Table'[ InvoiceID] ) ) RETURN IF ( _count = 2, 3, IF ( MAX ( [Exchange] ) = "FALSE", 2, 1 ) )The final output is shown below:
If it still fails to solve your problem, can you re-upload the file?
Best Regards,
Community Support Team_ Yalan Wu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi gaurav-narchal ,
Because your file cannot be opened here, so I create a simple example to calculate the Invoice level ; and create a measure as follows:
level =
VAR _count =
CALCULATE (
DISTINCTCOUNT ( 'Table'[Exchange] ),
ALLEXCEPT ( 'Table', 'Table'[ InvoiceID] )
)
RETURN
IF ( _count = 2, 3, IF ( MAX ( [Exchange] ) = "FALSE", 2, 1 ) )
The final output is shown below:
If it still fails to solve your problem, can you re-upload the file?
Best Regards,
Community Support Team_ Yalan Wu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.