Forum Discussion
shashar11
6 years agoFrequent Visitor
Suggestion needed
Hello - I need suggestions for building a PBI visual. Please see the below sample data: Employee ID Sold Items Price 1 Fruits 10 1 Flowers 5 1 Vegetable 15 2 Flowers ...
- 6 years ago
Hi shashar11 ,
Here we go.
Measure = VAR m = CALCULATE ( MAX ( 'Table'[Price] ), ALLEXCEPT ( 'Table', 'Table'[Employee ID] ) ) RETURN IF ( MAX ( 'Table'[Price] ) = m, 1, BLANK () )Pbix as attached.
VasTg
6 years agoMemorable Member
Create a measure like below and use it in the visual. Replace the table name as desired
Measure = VAR EMP_ID = MAX('Table (2)'[Employee ID])
RETURN CALCULATE(MAX('Table (2)'[Sold Items]),FILTER(ALL('Table (2)'),'Table (2)'[Employee ID]=EMP_ID && 'Table (2)'[Price]=MAX('Table (2)'[Price])))
Output:
If it helps, mark it as a solution
Kudos are nice too
- shashar116 years agoFrequent Visitor
Thanks for your suggestion. However, when I used your measure I got no/blank output.
Measure 21 = VAR EMP_ID = MAX(Emp_Test[Employee ID])
RETURN CALCULATE(MAX(Emp_Test[Sold Items]),FILTER(ALL(Emp_Test),Emp_Test[Employee ID]=EMP_ID && Emp_Test[Price]=MAX(Emp_Test[Price])))Please note: I just replaced the table name ->Emp_TestLet me know what I am doing wrong?Thanks!