Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now

Reply
GGworks
Frequent Visitor

DAX Measure on Prior year wont display on current row - how to drop it by 1

DAX Measure on Prior year wont display on current row - how to drop it by 1, how do i fix it to show like the right diagram

 

GGworks_0-1761163588223.png

 

 

1 ACCEPTED SOLUTION

Please provide sample data that covers your issue or question completely, in a usable format (not as a screenshot).
Do not include sensitive information. Do not include anything that is unrelated to the issue or question.
Please show the expected outcome based on the sample data you provided.

Need help uploading data? https://community.fabric.microsoft.com/t5/Community-Blog/How-to-provide-sample-data-in-the-Power-BI-...
Want faster answers? https://community.fabric.microsoft.com/t5/Desktop/How-to-Get-Your-Question-Answered-Quickly/m-p/1447...

View solution in original post

9 REPLIES 9
v-sshirivolu
Community Support
Community Support

Hi @GGworks ,

I would also take a moment to thank @lbendlin , for actively participating in the community forum and for the solutions you’ve been sharing in the community forum. Your contributions make a real difference.
 

I wanted to check if you had the opportunity to review the information provided. Please feel free to contact us if you have any further questions

Hi @GGworks  ,
Following the @lbendlin suggestion, kindly provide sample data that represents your expected outcome.

Hi @GGworks ,
Please provide sample data that covers your issue or question completely, in a usable format (not as a screenshot).
Do not include sensitive information. Do not include anything that is unrelated to the issue or question.
Please show the expected outcome based on the sample data you provided.

Praful_Potphode
Impactful Individual
Impactful Individual

Hi @GGworks ,

 

i think the issue is with PreviousMonthEndDate and PreviousMonthStartDate.

can you try below measure :

Total Previous Year Same Range =
VAR StartDate = MIN('DateMasterKey'[Date])
VAR EndDate = MAX('DateMasterKey'[Date])
VAR PreviousStartDate = EDATE(StartDate, -12)
VAR PreviousEndDate = EDATE(EndDate, -12)

RETURN
CALCULATE(
    [Total],
    FILTER(
        ALL('DateMasterKey'),
        'DateMasterKey'[Date] >= PreviousStartDate &&
        'DateMasterKey'[Date] <= PreviousEndDate
    )
)

please give kudos or mark it as solution.

 

Thanks and Regards,

Praful

Thank you, this gave me the same result as i have, it wont drop by 1.

my total is totalytd sum to get value matching to period not sure if thats causing issue

Hi @GGworks 

instead of Totalytd measure can you try using base measure like SUM and then try again

 

Thanks and Regards,

Praful

lbendlin
Super User
Super User

If your data model has a proper calendar table then you can use SAMEPERIODLASTYEAR.  Otherwise you can use OFFSET on the Fiscal year.

 

lbendlin_0-1761178280738.png

 

Thank you, this gave me the same result as i have, it wont drop by 1.

also i tried totlytd, sameperiod last year and got same result . my table is marked as  date table.

values are right but in the wrong row position.

Please provide sample data that covers your issue or question completely, in a usable format (not as a screenshot).
Do not include sensitive information. Do not include anything that is unrelated to the issue or question.
Please show the expected outcome based on the sample data you provided.

Need help uploading data? https://community.fabric.microsoft.com/t5/Community-Blog/How-to-provide-sample-data-in-the-Power-BI-...
Want faster answers? https://community.fabric.microsoft.com/t5/Desktop/How-to-Get-Your-Question-Answered-Quickly/m-p/1447...

Helpful resources

Announcements
November Power BI Update Carousel

Power BI Monthly Update - November 2025

Check out the November 2025 Power BI update to learn about new features.

Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.

Top Solution Authors
Top Kudoed Authors