Forum Discussion
Snapshot data - Generated / Reduced volumes
Hi All,
Looking for some help with a puzzle I am trying to solve ...
Please see example data & visual below.
I have been asked to recreate this visual in Power BI using the example data below.
The generated/reduced volumes are calculated based on the previous month's status (Healthy or SMOG) and change in volume to the next month.
Hi Nph ,
Based on the data
You can follow these steps-
1. Add a measure for Previous Status2.Add a measure for Previous Stock
3.add Change in stock and change in type columns
4.Calculate Smog Value by Batch, Reduction Value and Generated value.
5.Plot using clustered column chart with-
snapshot_date on X-axisSmog value by batch, reduction value and Generated value on Y-axis.
Below snap for reference-If the response has addressed your query, please accept it as a solution and give a 'Kudos' so other members can easily find it.
Thank You
7 Replies
- burakkaragozSuper User
Hi Nph ,
Interesting challenge! From what I can see, the key is to calculate the change in volume between months and then classify it as "Generated" or "Reduced" based on the previous month's status.
Here’s a rough approach you can try in Power BI:
- Sort your data by month and use EARLIER() or INDEX() (if using DAX with window functions) to get the previous month's status and volume.
- Create a calculated column or measure to compare current and previous volumes.
- Based on the logic:
- If previous month was "Healthy" and volume increased → "Generated"
- If previous month was "SMOG" and volume decreased → "Reduced"
- Adjust the logic as needed for your case.
Once you have that classification, you can use it in a stacked bar chart to show the breakdown.
If you can share a bit more about the structure of your data (columns, sample rows), I can help write the exact DAX too.
If my response resolved your query, kindly mark it as the Accepted Solution to assist others. Additionally, I would be grateful for a 'Kudos' if you found my response helpful.
translation and formatting supported by AI- NphFrequent Visitor
Hi, thanks for coming back on this.
This example is how the data is structured
- v-sdhruvCommunity Support
Hi Nph ,
If possible, could you please provide more raw data in your tables (exclude sensitive data). It would be helpful to find out the solution. You can refer the following links to share the required info:How to provide sample data in the Power BI Forum
You can refer the following link to upload the file to the community.
How to upload PBI in Community
Thank You! - v-sdhruvCommunity Support
Hi Nph ,
Based on the data
You can follow these steps-
1. Add a measure for Previous Status2.Add a measure for Previous Stock
3.add Change in stock and change in type columns
4.Calculate Smog Value by Batch, Reduction Value and Generated value.
5.Plot using clustered column chart with-
snapshot_date on X-axisSmog value by batch, reduction value and Generated value on Y-axis.
Below snap for reference-If the response has addressed your query, please accept it as a solution and give a 'Kudos' so other members can easily find it.
Thank You