Power BI is turning 10! Tune in for a special live episode on July 24 with behind-the-scenes stories, product evolution highlights, and a sneak peek at what’s in store for the future.
Save the dateEnhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.
Trying to calculate % Chg on Social Media followers however, the data that is given is accumulated:
How can this be done for last quarter vs. previous closed qtr? I have a calendar table with date offsets, however, the measure is just summing the total for the entire quarter and not pickng the last/max date in the last quarter....?
Brand | Network | Date | Followers |
XYZ | 01/01/2024 | 15000 | |
XYZ | 02/01/2024 | 15200 | |
XYZ | 03/01/2024 | 15300 | |
XYZ | 01/01/2024 | 22500 | |
XYZ | 02/01/2024 | 25000 | |
Solved! Go to Solution.
Hi @Alpesh
we need to adjust your DAX formulas to ensure they correctly calculate the percentage changes and follower counts for the specified periods. Here’s how you can do it:
Previous Quarter =
CALCULATE(
SELECTEDMEASURE(),
'Calendar'[CurQuarterOffset] = -1
)
Current Quarter -2 =
CALCULATE(
SELECTEDMEASURE(),
'Calendar'[CurQuarterOffset] = -2
)
% Chg Qtr vs. YAG =
DIVIDE(
CALCULATE(
SELECTEDMEASURE(),
'Dynamic Calculation Group'[Dynamic Periods] = "Previous Quarter"
) -
CALCULATE(
SELECTEDMEASURE(),
'Dynamic Calculation Group'[Dynamic Periods] = "Closed Quarter YAG"
),
CALCULATE(
SELECTEDMEASURE(),
'Dynamic Calculation Group'[Dynamic Periods] = "Closed Quarter YAG"
)
)
Previous Month =
CALCULATE(
SELECTEDMEASURE(),
'Calendar'[CurMonthOffset] = -1
)
These measures should help you calculate the required metrics and percentage changes for your social media followers.
Hi @Alpesh
we need to adjust your DAX formulas to ensure they correctly calculate the percentage changes and follower counts for the specified periods. Here’s how you can do it:
Previous Quarter =
CALCULATE(
SELECTEDMEASURE(),
'Calendar'[CurQuarterOffset] = -1
)
Current Quarter -2 =
CALCULATE(
SELECTEDMEASURE(),
'Calendar'[CurQuarterOffset] = -2
)
% Chg Qtr vs. YAG =
DIVIDE(
CALCULATE(
SELECTEDMEASURE(),
'Dynamic Calculation Group'[Dynamic Periods] = "Previous Quarter"
) -
CALCULATE(
SELECTEDMEASURE(),
'Dynamic Calculation Group'[Dynamic Periods] = "Closed Quarter YAG"
),
CALCULATE(
SELECTEDMEASURE(),
'Dynamic Calculation Group'[Dynamic Periods] = "Closed Quarter YAG"
)
)
Previous Month =
CALCULATE(
SELECTEDMEASURE(),
'Calendar'[CurMonthOffset] = -1
)
These measures should help you calculate the required metrics and percentage changes for your social media followers.
Here's the excel file: https://docs.google.com/spreadsheets/d/1NuK9mEQoIWvocDh5GI8HSAnH4Ent1OnO/edit?usp=sharing&ouid=10320...
Requirement is:
Last Qtr Closed: Sum of all Networks & breakdown by network: % Chg vs. previous closed qtr, % chg vs. closed qtr YAG. We'd also need to display the followers count at the last day of the closed quarter
Last Month Closed: Sum of all Networks & breakdown by network: % Chg vs. previous closed month, % chg vs. closed month YAG. We'd also need to display the followers count at the last day of the closed month
Sum of all Networks & breakdown by network: % Chg YTD closed vs. YTD YAG closed
Slicer is used to create brand reports
I want to use calculation groups in conjuction (as I have lots of other social media metrics - engagements, likes, shares, saves.... already with calculation groups for the % Chg)
Formulas used for calculation group for the other social media metrics:
Not enough sample data. You need to include the closing balance of the preceding months (Dec 2023 in this case.)
Check out the July 2025 Power BI update to learn about new features.
This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.
User | Count |
---|---|
68 | |
64 | |
52 | |
39 | |
26 |
User | Count |
---|---|
80 | |
57 | |
45 | |
44 | |
35 |