Forum Discussion
diederd
6 years agoHelper II
Using LookUpValue in a measure (including switch)
Hello PBI Community. I've recently come across an issue and I'm hoping the following is possible. Whilst I have two tables; related by means of the <identifier> column - the idea is that I'm wish...
- 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.
amitchandak
6 years agoSuper User
diederd , Can you share sample data and sample output in table format? Or a sample pbix after removing sensitive data.
You can move data from one table to another like the example other than lookup
City Name in sales table= maxx(FILTER(geography,geography[City Id]=Sales[City Id]),geography[City])
You can add conditions as per need