Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.
I have 6 columns:
| p1 | p2 | p3 | p4 | p5 | cost |
-------------------------------------------------------------------
ex1 | apple | orange | apple | apple | grape | 500 |
ex2 | apple | orange | grape | | | 300 |
ex3 | apple | orange | orange | | | 750 |
ex4 | apple | | | | | 250 |
the result I expected:
ex1= 1 apple, 1 orange, 1 grape
ex2= 1 apple, 1 orange, 1 grape
ex3= 1 apple, 1 orange
ex4= 1 apple
cost don't depend on anything.
I need to make a bar chart (for all 5 columns) to show how many each product appear, each product will be count as 1 in the same example no matter how much the product appears.
I already tried pivot and the result is exactly what I want BUT it multiply cost column and ruined everything.
is there any other way to do it? Sorry if this is a basic problem, I'm just a beginner in power BI. any suggestion will be appreciated
Hi @wenniin,
If you want to make hte count of the products follow the steps:
Result should be as you want check below:
Regards,
MFelix
Regards
Miguel Félix
Proud to be a Super User!
Check out my blog: Power BI em Portuguêssorry for the late response, I actually have many column in my table but only taking a neccesary column for ask.
I need a 'year' column to make this:
I need bar chart to show me the quantity of product (apple, orange, grape) in 5 column (p1-p5) for certain condition (the product only count as 1 even if it shows more than once in the same row)
I'm using p1-p5 as axis (but it only calculating p1 and it is my current problem) and -count of 'year'- as value
Sorry for my lack of description and everything, please tell me if you have another suggestions. thank you
Perhaps you just need to use AVERAGE for your cost instead of SUM and then you would be good?
sorry if my question is confusing, I don't need the calculation of cost. The one I need is a total of product (p1-p5), but with a certain condition: if the product appear more than 1 in a row, it will only count as 1.
I can get the result I want with pivot function but it multiplied my cost column so I can't use that function
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
106 | |
94 | |
77 | |
65 | |
53 |
User | Count |
---|---|
145 | |
105 | |
104 | |
90 | |
63 |