Forum Discussion
Power BI Chart - Matrix Chart
- 1 year ago
Hi royalty123,
Thank you for reaching out to the Microsoft fabric community forum. Thank you lbendlin, danextian, for your inputs on this issue.
After thoroughly reviewing the details you provided, I was able to reproduce the scenario, and it worked on my end. I have used it as sample data on my end and successfully implemented it.
Date Table Dax:
CalendarTable = ADDCOLUMNS(
CALENDAR(MIN(Data[Date]), MAX(Data[Date])),
"Year", YEAR([Date]),
"Month", FORMAT([Date], "MMM")
)
Previous Year’s Cost Measure:Prev_Year_Cost = CALCULATE(SUM(Data[Cost]), SAMEPERIODLASTYEAR(CalendarTable[Date]))
Cost Increase YoY Measure:
Sales Growth from Cost Increase Measure:Cost_Change_YoY = SUM(Data[Cost]) - [Prev_Year_Cost]
Previous Year’s Quantity Measure:
Prev_Year_Qty = CALCULATE(SUM(Data[Quantity]), SAMEPERIODLASTYEAR(CalendarTable[Date]))
Sales_Growth_from_Cost = [Cost_Change_YoY] * [Prev_Year_Qty]Sales Growth from Quantity Increase Measure:
Sales_Growth_from_Qty = SUMX(Data, Data[Cost] * (Data[Quantity] - Data[Prev_Year_Qty]))
I am also including .pbix file for your better understanding, please have a look into it:
I hope this could resolve your issue, if you need any further assistance, feel free to reach out. If this post helps, then please give us ‘Kudos’ and consider Accept it as a solution to help the other members find it more quickly.
Thank you for using Microsoft Community Forum.
Hi royalty123,
I wanted to check if you had the opportunity to review the information provided. Please feel free to contact us if you have any further questions. If my 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 royalty123,
I hope this information is helpful. Please let me know if you have any further questions or if you'd like to discuss this further. If this answers your question, please Accept it as a solution and give it a 'Kudos' so others can find it easily.
Thank you.