Forum Discussion
Difference % in Cross Tab
- Anonymous9 years ago
sudhakar111,
Create a calendar table in your PBIX file following the instructions in this blog: https://kohera.be/blog/business-intelligence/how-to-create-a-date-table-in-power-bi-in-2-simple-steps/ .
Then create relationship using Date field and INV_BILLING_DATE field between the calendar table and Sales_1 table, and create YOY Growth using the following DAX.
YOY Growth =(CALCULATE(SUM(Sales_1[BILLED_QTY])-CALCULATE(SUM(Sales_1[BILLED_QTY]),DATEADD('Calendar'[Date],-1,YEAR)))
)
Regards,
Lydia
Thanks a lot. I checked the PBIX file but could not find the matrix visual.
Tried the formula in my report.
The below part of the formula is giving an error.
YOY Growth =
(CALCULATE(SUM(Sales_1[BILLED_QTY])-CALCULATE(SUM(Sales_1[BILLED_QTY]),DATEADD('Sales_1'[INV_BILLING_DATE],-1,YEAR)))
)
Hmm,
this is odd, just downloaded the mentioned file and there is a report page
and on this page there is the matrix visual I mentioned above, please re-download and check again.
Your Formula looks not the same as mine, can you please provide the error Message and also easily reproducible sample data, without these information it is very hard or impossible to figure out what's going wrong on your side.
Regards
- sudhakar1119 years agoHelper IV
I was able to see the matrix visual after downloading again. I uploaded some sample data. Kindly check it.
https://drive.google.com/file/d/0B409kD4MKi2RTjAyLXdCSldxdWs/view