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.
Hello I'm new to Power BI
I want to create a bar chart by month and display for each month the ratio of sales per month to total sales
Please advise
Solved! Go to Solution.
This can totally be done.
First, you'll need a measure to calculate the ratio - I'll break it down into three measures. I'm not sure what your data looks like so I'm going to assume that you have one big table of data that has all of your sales listed by date.
[Sales] = SUM( Sales[Amount] ) [Total Sales] = CALCULATE( [Sales], ALL( Sales[Date] ) ) [Ratio - Sales to Total Sales] = DIVIDE( [Sales], [Total Sales] )
Second, You'll drag the [Ratio - Sales to Total Sales] onto the dashboard area in Power BI, select bar chart, put the months in the Axis section and you should be good to go.
This can totally be done.
First, you'll need a measure to calculate the ratio - I'll break it down into three measures. I'm not sure what your data looks like so I'm going to assume that you have one big table of data that has all of your sales listed by date.
[Sales] = SUM( Sales[Amount] ) [Total Sales] = CALCULATE( [Sales], ALL( Sales[Date] ) ) [Ratio - Sales to Total Sales] = DIVIDE( [Sales], [Total Sales] )
Second, You'll drag the [Ratio - Sales to Total Sales] onto the dashboard area in Power BI, select bar chart, put the months in the Axis section and you should be good to go.
thank you for your prompt reply
Actually I'm expert in QlikView set analysis
and it seems that DAX is similar to that
so here to ignore dimension in a chart we use All([the dimension to ignore])?
is this true?
That's exactly right ...
You may need to instruct the measure to ignore the month dimension instead of the date dimension.
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 |
---|---|
114 | |
100 | |
81 | |
70 | |
62 |
User | Count |
---|---|
148 | |
116 | |
104 | |
90 | |
65 |