Forum Discussion
Snapshot data - Generated / Reduced volumes
- 1 year ago
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
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
Hi, thanks for coming back on this.
This example is how the data is structured