Forum Discussion
orghn
4 years agoHelper I
Help on Measure Selected
Hi Everyone! I need to select only 1 lab and N products for many Labs. I need to find the price per month of my product (my_price) and compare to the total_prod_price of each prod to find the diff...
- Anonymous4 years ago
Hi orghn ,
1.but I cant delete that relationship. You could create a new Lab table for the slicer:
New Table = VALUES(Lab[Lab Name])Measure = var _allProds=SUMMARIZE(FILTER(ALL('Product'),[LabName] =MAX('New Table'[Lab Name])),[ProductName]) return CALCULATE(SUM('Price'[Price]),FILTER(ALLSELECTED('Price'),[Product] in _allProds))diff = [Measure]/[Total_Prod_Price]2. And I also need to select N months So what's your expected when select multiple months?
On my side:
Best Regards,
Eyelyn Qin
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Anonymous
4 years agoNot applicable
Hi orghn ,
Based on my understanding,
- Select Lab B, the related Product is B,E
- Select Product Name A,B,C
- Since the same Product based on 1 and 2 is B, so my_price=Product B=1600
If so,please firstly delete the relationship between Lab Table and Product Table:
Then create the measure:
my price measure =
var _allProds=SUMMARIZE(FILTER(ALL('Product'),[LabName] =MAX('Lab'[Lab Name])),[ProductName])
return CALCULATE(SUM('Price'[Price]),FILTER(ALLSELECTED('Price'),[Product] in _allProds))
Best Regards,
Eyelyn Qin
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
orghn
4 years agoHelper I
Hi Anonymous ,
Thanks for your help but I cant delete that relationship. And I also need to select N months