Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.
Hello, I'm pretty new to Power BI but can work my way around the software somewhat. Though if I have found solutions to this problem they were too complicated for me to understand.
I've included a sample table of data that shows the kind of data that I'm using below. What I would like to do is from this table create a Vertical Column graph with four bars, one for each type of beverage, on the X-Axis. On the Y-Axis I want to use a slicer in order to look at a variety of different metrics, but only one at a time. I want to be able to look at the sales brought in by each beverage, and then with the slicer change it to the cost of production or units sold.
Product | Sales | # Sold | Production Cost |
Cola | $ 23,720.00 | 18,976 | $ 7,140.00 |
Root Beer | $ 40,180.00 | 32,144 | $ 11,276.00 |
Club Soda | $ 7,822.00 | 6,257 | $ 2,633.00 |
Ginger Ale | $ 13,988.00 | 11,190 | $ 4,674.00 |
My process thus far has been to: 1) Insert a vertical bar graph with the X-Axis set to the "Product Column." 2) Create a new field parameter, selecting the other three columns "Sales," "# Sold," and "Production Cost" as the Fields, naming the new Parameter "Analysis By." I make sure the checkbox is ticked to indicate I'd like to automatically add a slicer. 3) Once the slicer has appeared, I drag the parameter "Analysis By" to the Y-Axis of my vertical bar chart.
At this point in my process I would have expected the chart to display something, but it remains empty and the slicer does nothing when I select different fields. I've followed the process outlined in the video below almost identically but haven't made any progress.
I've done a lot of looking into this but haven't found anything, but as mentioned before I'm relatively new to Power BI and could have missed a solution that was right infront of me. Regardless, thank you in advance for any help!
Solved! Go to Solution.
Hi @mwklink,
You state you added your 3 'columns' to your field parameter - for clarity, are these actually columns or measures?
You need to ensure you are using measures to return something on the Y-Axis. So if you have not created any for Sales, Sold or Production Cost, create these as measures and try it again.
Hi @mwklink,
You state you added your 3 'columns' to your field parameter - for clarity, are these actually columns or measures?
You need to ensure you are using measures to return something on the Y-Axis. So if you have not created any for Sales, Sold or Production Cost, create these as measures and try it again.
Hi again @BITomS ,
Thank you for your help, the problem was indeed that I needed to be using measures.
Hi @BITomS ,
Thank you for the feedback, they are indeed columns and not measures, I wasn't aware that measures were needed to return something on the Y-Axis. The values in the column are the values that I need displayed however, and I'm not sure how to efficiently create a measure that just reports those values as-is.
The difference is one is implicit and one is explicit. You can read more about the difference here: https://radacad.com/explicit-vs-implicit-dax-measures-in-power-bi
So to create a measure in your case should be relatively simple: just select 'create new measure' from the home ribbon and then it's "measurename" = sum("columnname")
User | Count |
---|---|
98 | |
91 | |
84 | |
73 | |
67 |
User | Count |
---|---|
115 | |
102 | |
98 | |
71 | |
66 |