Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and more.
Get startedGrow your Fabric skills and prepare for the DP-600 certification exam by completing the latest Microsoft Fabric challenge.
Hi Everyone!
I need to select only 1 lab and N products. I need to find the price per month of my product (my_price) and compare to the total_prod_price to find the difference (%) between my product and the others.
Sample file: https://www.dropbox.com/s/jh9ctxatt079dvq/Sample%28Updated2%29%20%281%29.pbix?dl=0
Hi @orghn ,
Here are the steps you can follow:
1. Create measure.
My_Price =
var _select=SELECTCOLUMNS('Product',"1",'Product'[ProductName])
var _selectmonth=SELECTEDVALUE('Price'[Month])
return
CALCULATE(SUM('Price'[Price]),FILTER(ALL('Price'),'Price'[Month]=_selectmonth&&'Price'[Product] in _select))
Total_Prod_Price =
SUMX(FILTER(ALL('Price'),'Price'[Product]=MAX('Price'[Product])),'Price'[Price])
2. Result:
According to the slicer, if you select [Lab_Name]=”Lab B”, [Product Name] will show the addition of the data of Prodct E and Product B according to the Product table
If you want to select ABC to appear, you can just select ProdctName=”A”,”B”,”C”.
Best Regards,
Liu Yang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly
Hi @v-yangliu-msft , thanks for your reply, maybe I explained wrong. I need this output:
My price should be the price for that month of the products from the selected Lab. 1500 should be for the first 3 rows and 1600 fir the last 3.
Hi:
This gives you the price avg but in the grid it get's weird. Standing alone it is fine for getting your avg monthly product prices.
Yes, because I have many products for my lab, I only need the Lab and products selected
Hi:
Did you use the solution file? Thanks..
Yes, I´m working with the attached file but I need to see all the products but only my price on the first column
Join the community in Stockholm for expert Microsoft Fabric learning including a very exciting keynote from Arun Ulag, Corporate Vice President, Azure Data.
User | Count |
---|---|
70 | |
36 | |
21 | |
18 | |
15 |
User | Count |
---|---|
128 | |
29 | |
28 | |
24 | |
22 |