Forum Discussion
TOPN current month x quantity Tickets Last Month
- 9 years ago
I've solved your problem using the PREVIOUSMONTH function in DAX. I have a workbook I can send you with the solution if you have an email address I can send it to.
In short:
Make sure you have a calendar table where the date field is data type: "Date" and you also have a date field with data type: "Date" on your TicketSales table.
For TOPN, you can just use the new filter in Power BI: https://powerbi.microsoft.com/en-us/blog/power-bi-desktop-october-feature-summary/preview/#topN
Then, add this measure (edited with your specific information):
TicketsLastMonth = CALCULATE(SUM(TicketSales[Ticket Sales]), PREVIOUSMONTH('Calendar'[Date]))
Add the Month slicer from your Calendar table, then add a Clustered Column Chart with your System on Axis, and TicketSales and TicketsLastMonth on Values.
I've solved your problem using the PREVIOUSMONTH function in DAX. I have a workbook I can send you with the solution if you have an email address I can send it to.
In short:
Make sure you have a calendar table where the date field is data type: "Date" and you also have a date field with data type: "Date" on your TicketSales table.
For TOPN, you can just use the new filter in Power BI: https://powerbi.microsoft.com/en-us/blog/power-bi-desktop-october-feature-summary/preview/#topN
Then, add this measure (edited with your specific information):
TicketsLastMonth = CALCULATE(SUM(TicketSales[Ticket Sales]), PREVIOUSMONTH('Calendar'[Date]))
Add the Month slicer from your Calendar table, then add a Clustered Column Chart with your System on Axis, and TicketSales and TicketsLastMonth on Values.