The ultimate Fabric, Power BI, SQL, and AI community-led learning event. Save €200 with code FABCOMM.
Get registeredEnhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.
Hi Team,
I just wanted to show a line chart of QoQ growth for each year. I have data from 2017 Jan to 2019 Dec. I am using a date table for growth calculation. My calculation is as follows.
Hi,
Do you want to show comparison among Quarters for each year, like 2017-Q1 with 2018-Q1,2017-Q2 with 2018-Q2?
If so, please try to change your measure to this:
Sale QoQ% =
VAR __PREV_QUARTER =
CALCULATE(
SUM('Sales'[Sale]),
DATEADD('DateTable'[Date], -1, YEAR)
)
RETURN
DIVIDE(SUM('Sales'[Sale]) - __PREV_QUARTER, __PREV_QUARTER)
Best Regards,
Giotto Zhi
You can Use Time intelligence function. You need Date table for that. Example
QTD Sales = CALCULATE(SUM(Sales[Sales Amount]),DATESQTD(('Date'[Date])))
Last QTD Sales = CALCULATE(SUM(Sales[Sales Amount]),DATESQTD(dateadd('Date'[Date],-1,QUARTER)))
Last to last QTD Sales = CALCULATE(SUM(Sales[Sales Amount]),DATESQTD(dateadd('Date'[Date],-2,QUARTER)))
Next QTD Sales = CALCULATE(SUM(Sales[Sales Amount]),DATESQTD(dateadd('Date'[Date],1,QUARTER)))
Last year same QTD Sales = CALCULATE(SUM(Sales[Sales Amount]),DATESQTD(dateadd('Date'[Date],-1,Year)))
You can take diff between QTD and Last QTD
To get the best of the time intelligence function. Make sure you have a date calendar and it has been marked as the date in model view. Also, join it with the date column of your fact/s. Refer :
https://radacad.com/creating-calendar-table-in-power-bi-using-dax-functions
https://www.archerpoint.com/blog/Posts/creating-date-table-power-bi
https://www.sqlbi.com/articles/creating-a-simple-date-table-in-dax/
User | Count |
---|---|
77 | |
76 | |
36 | |
31 | |
29 |
User | Count |
---|---|
93 | |
79 | |
57 | |
48 | |
48 |