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.
Hi,
I'm trying to do up a report to show quarterly changes in a metric that I'm tracking. As seen in the table below, each row represents the results ('Quality' and 'Short-term Quantity) from a country in a quarter (i.e. Date).
Date | Country | Quality |
31-Mar-21 | A | 0.5 |
31-Mar-21 | B | 0.43 |
30-Jun-21 | A | 0.22 |
30-Jun-21 | B | 0.5 |
I would then like to find out each country's difference in results, quarter over quarter. So that it looks like something like this:
Date | Country | Quality | Short-term Quantity | Difference in Quality (measured against previous Quarter) |
31-Mar-21 | A | 0.5 | 0.54 | n.a. |
31-Mar-21 | B | 0.43 | 0.43 | n.a. |
30-Jun-21 | A | 0.22 | 0.36 | -.28 |
30-Jun-21 | B | 0.5 | 0.54 | .07 |
I plan to have my data refreshed every quarter, so as a new quarter comes along, there will be new datapoints to reflect the results of the country in that new quarter. Currently struggling to even find out where to begin this or if this is even doable. Any help is greatly appreciated!!
Solved! Go to Solution.
@Anonymous,
Create a date table with column Qtr End Date, and create a relationship between the date table and fact table:
You can use the calculated column below in the date table:
Qtr End Date = ENDOFQUARTER ( DimDate[Date] )
Create measure:
Quantity Difference in Quality =
VAR vCurrentQtr =
MAX ( FactTable[Quality] )
VAR vLastQtr =
CALCULATE ( MAX ( FactTable[Quality] ), DATEADD ( DimDate[Date], -1, QUARTER ) )
VAR vResult =
IF (
NOT ( ISBLANK ( vCurrentQtr ) || ISBLANK ( vLastQtr ) ),
vCurrentQtr - vLastQtr
)
RETURN
vResult
Create visual using DimDate[Qtr End Date]:
Proud to be a Super User!
Hi @Anonymous,
Did DataInsights 's suggestions help with your scenario? if that is the case, you can consider Kudo or accept this suggestion to help others who faced similar requirements.
If these also don't help, please share more detailed information to help us clarify your scenario to test.
How to Get Your Question Answered Quickly
Regards,
Xiaoxin Sheng
@Anonymous,
Create a date table with column Qtr End Date, and create a relationship between the date table and fact table:
You can use the calculated column below in the date table:
Qtr End Date = ENDOFQUARTER ( DimDate[Date] )
Create measure:
Quantity Difference in Quality =
VAR vCurrentQtr =
MAX ( FactTable[Quality] )
VAR vLastQtr =
CALCULATE ( MAX ( FactTable[Quality] ), DATEADD ( DimDate[Date], -1, QUARTER ) )
VAR vResult =
IF (
NOT ( ISBLANK ( vCurrentQtr ) || ISBLANK ( vLastQtr ) ),
vCurrentQtr - vLastQtr
)
RETURN
vResult
Create visual using DimDate[Qtr End Date]:
Proud to be a Super User!
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 |
---|---|
76 | |
75 | |
54 | |
38 | |
31 |
User | Count |
---|---|
99 | |
56 | |
50 | |
42 | |
40 |