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.
I have created the below measure for Current survey percentage.
I assume I need to use CALCULATE for the Previous Survey Result measure. I tried to use DATEADD with CALCULATE to get the desired result, but because the surveys are all on arbitary dates this doesn't work.
Can anyone help
Current survey percentage
current_percentage =
You can try the following measure
Previous Survey Percentage =
VAR CurrentSurveyDate = MAX('Results_Consolidated'[survey_date])
VAR PreviousSurveyDate =
CALCULATE(
MAX('Results_Consolidated'[survey_date]),
FILTER( 'Results_Consolidated', 'Results_Consolidated'[survey_date] < CurrentSurveyDate ) )
RETURN
IF(
ISBLANK(PreviousSurveyDate),
BLANK(),
VAR TotalPercentage =
SUMX (
SUMMARIZE (
'Results_Consolidated',
'Results_Consolidated'[question_shortened],
'Results_Consolidated'[question_category],
'Results_Consolidated'[percentage],
'Results_Consolidated'[survey_date],
'Results_Consolidated'[demographic_category],
'Results_Consolidated'[demographic_subcategory],
'Response Hierarchy'[response_text],
'Response Hierarchy'[response_text_groups],
'Response Hierarchy'[response_text_subgroups] ), [percentage] )
VAR PreviousTotalPercentage =
CALCULATE(
SUMX (
SUMMARIZE (
'Results_Consolidated',
'Results_Consolidated'[question_shortened],
'Results_Consolidated'[question_category],
'Results_Consolidated'[percentage],
'Results_Consolidated'[survey_date],
'Results_Consolidated'[demographic_category],
'Results_Consolidated'[demographic_subcategory],
'Response Hierarchy'[response_text],
'Response Hierarchy'[response_text_groups],
'Response Hierarchy'[response_text_subgroups] ), [percentage] ),
FILTER( ALL('Results_Consolidated'),
'Results_Consolidated'[survey_date] = PreviousSurveyDate ) )
RETURN
IF(
ISBLANK(PreviousTotalPercentage),
BLANK(),
FORMAT(PreviousTotalPercentage, "0.0%")
)
)
Thank you very much, unfortunatly though it just displays blanks.
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 |
---|---|
19 | |
7 | |
6 | |
5 | |
5 |
User | Count |
---|---|
25 | |
10 | |
10 | |
9 | |
6 |