Join us for an expert-led overview of the tools and concepts you'll need to pass exam PL-300. The first session starts on June 11th. See you there!
Get registeredPower BI is turning 10! Let’s celebrate together with dataviz contests, interactive sessions, and giveaways. Register now.
I have a dataset in below format:
Date Sales Amount
2017/1/1 1,000
2017/1/1 5,000
2017/1/2 7,000
...
So my growth % on 1/2 = (7000-6000)/6000
Similarly, I will have growth % for each day. Now I want to show the average growth % by year and by month. How to achieve it? Thank you!
Solved! Go to Solution.
Hi @qixue,
You can try to use below formula to calculate the DoD growth %:
Measure:
DoD Growth = VAR current_Date = MAX ( 'Table'[Date] ) VAR current_amount = SUMX ( FILTER ( ALL ( 'Table' ), [Date] = current_Date ), [Amount] ) VAR previous_amount = SUMX ( FILTER ( ALL ( 'Table' ), [Date] = current_Date - 1 ), [Amount] ) RETURN DIVIDE ( current_amount - previous_amount, previous_amount, 0 )
>>Similarly, I will have growth % for each day. Now I want to show the average growth % by year and by month. How to achieve it?
You can create a summary table with 'dod growth', then wirite a measure to calcuate the average. After these steps, create a table visual with different date column as the group, you can switch hierarchy levl to get the different average of current level.
Calculate table:
Summary table = VAR summaried = SUMMARIZE ( 'Table', [Date], "Total Amount", SUM ( 'Table'[Amount] ) ) RETURN ADDCOLUMNS ( summaried, "DOD Growth %", [DoD Growth] )
Measure:
AVG DoD = AVERAGE('Summary table'[DOD Growth %])
Regards,
Xiaoxin Sheng
Hi @qixue,
You can try to use below formula to calculate the DoD growth %:
Measure:
DoD Growth = VAR current_Date = MAX ( 'Table'[Date] ) VAR current_amount = SUMX ( FILTER ( ALL ( 'Table' ), [Date] = current_Date ), [Amount] ) VAR previous_amount = SUMX ( FILTER ( ALL ( 'Table' ), [Date] = current_Date - 1 ), [Amount] ) RETURN DIVIDE ( current_amount - previous_amount, previous_amount, 0 )
>>Similarly, I will have growth % for each day. Now I want to show the average growth % by year and by month. How to achieve it?
You can create a summary table with 'dod growth', then wirite a measure to calcuate the average. After these steps, create a table visual with different date column as the group, you can switch hierarchy levl to get the different average of current level.
Calculate table:
Summary table = VAR summaried = SUMMARIZE ( 'Table', [Date], "Total Amount", SUM ( 'Table'[Amount] ) ) RETURN ADDCOLUMNS ( summaried, "DOD Growth %", [DoD Growth] )
Measure:
AVG DoD = AVERAGE('Summary table'[DOD Growth %])
Regards,
Xiaoxin Sheng
Hi,
Share a dataset/download link of your file and also show your expected result.
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 |
---|---|
84 | |
75 | |
68 | |
41 | |
35 |
User | Count |
---|---|
102 | |
56 | |
52 | |
46 | |
40 |