Forum Discussion
Using LookUpValue in a measure (including switch)
- 6 years ago
Hi diederd ,
There are duplicate rows in your EPP table. So, lookupvalue() will return multiple values in a cell. This is not allowed.
Try this:
versionInstalled = SWITCH ( SELECTEDVALUE ( tblSoftware[packageName] ), "EPP", CALCULATE ( FIRSTNONBLANK ( EPP[Application Version], 1 ), -----------return the first not blank value FILTER ( ALLSELECTED ( EPP ), EPP[Identifier] = MAX ( 'Active Devices'[Identifier] ) ) ) )Best Regards,
Icey
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi diederd ,
There are duplicate rows in your EPP table. So, lookupvalue() will return multiple values in a cell. This is not allowed.
Try this:
versionInstalled =
SWITCH (
SELECTEDVALUE ( tblSoftware[packageName] ),
"EPP", CALCULATE (
FIRSTNONBLANK ( EPP[Application Version], 1 ), -----------return the first not blank value
FILTER (
ALLSELECTED ( EPP ),
EPP[Identifier] = MAX ( 'Active Devices'[Identifier] )
)
)
)
Best Regards,
Icey
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
- diederd6 years agoHelper II
Icey.
Thank you for your response and apologies for the delay in my response.
Having tried your solution; this works great however would it be possible to tweak the query to return only specific applications versions? I'm trying to create a query which returns all software products that are non-compliant based on an installed version.
Hope that makes sense..
Thank you again for your help regarding this issue.