Power BI is turning 10, and we’re marking the occasion with a special community challenge. Use your creativity to tell a story, uncover trends, or highlight something unexpected.
Get startedJoin us for an expert-led overview of the tools and concepts you'll need to become a Certified Power BI Data Analyst and pass exam PL-300. Register now.
Hi,
I have a graph which compares Customer Name on the Y_Axis and SalesAmount on the X_Axis.They need a MOM and QOQ filters.What exactly QOQ/MOM i am referring is when i select a month in the filter it should compare SalesAmount that month and just its previous month for every customer.For Example if i select 2016 Jan,It should compare 2016 Jan and 2015 Dec salesAmounts for every customer. Samething for Quater also.Is it possible in powerBI?What are the DAX calculations should i use?Thanks in Advance.
You can use the dateadd function like this
Total Sales = sum(table[sales column])
total sales prior month = calculate([total sales], dateadd(calendar[date],-1,month))
you need a calendar table http://exceleratorbi.com.au/power-pivot-calendar-tables/
the quarter calc depends what you need (e.g. Is it a rolling quarter or fixed quarter?)
total sales prior quarter = calculate([total sales], dateadd(calendar[date],-1,quarter))
Hi,
Thanks a lot for the reply.
When i created a derived column using below Dax,
PreviousOrders_ = CALCULATE(SUM(Sheet1[OrderAmount]),DATEADD(Sheet1[BillStartDate],-1,MONTH))
I am getting an empty with no data.May i know why?
Hi @ashmozzart,
As most Time Intelligence Functions (DAX) require an individual and consecutive Date table to work correctly, you may need create it using CALENDAR or CALENDARAUTO Function (DAX) if you don't have yet. And create a relationship between the Date table and your fact table with the Date column.
Assume your Date table is called "DateTable", then the formula to create the measure should like below.
PreviousOrders_ = CALCULATE ( SUM ( Sheet1[OrderAmount] ), DATEADD ( DateTable[Date], -1, MONTH ) )
Regards
This should be written as a measure, not a column.
This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.
Check out the June 2025 Power BI update to learn about new features.
User | Count |
---|---|
78 | |
76 | |
59 | |
35 | |
33 |
User | Count |
---|---|
100 | |
62 | |
56 | |
47 | |
41 |