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! Learn more

Reply
Anonymous
Not applicable

Measure return blank

Hi guys,

 

I have two selectors, fiscal date and month. Based on this selection I want to return the value for the previous fiscal year and month.

 

I have two tabels:  the fiscal year comes from the fact table and the month comes form the dimension table

Reda89_0-1645524050756.png

 

So the problem arises when I select current fiscal year 21/22 and month April onward, the measure returns BLANK values. The measure is supposed to return sum value of the previous fiscal year 20/21 and its month.

 

When I select 21/22 and April the measure should return value of 5.

 

I also deactivated the realationship from month to Fiscal selector so I have the choice to sleect previous years values.

Reda89_0-1645533340677.png

 

I am sharing my powerbi file for more clarification:

https://drive.google.com/file/d/1z43jg5ucy02iqJlJIQFJIrGHoJ9bUtjJ/view?usp=sharing

 

Does anybody know how to fix this ?

 

1 ACCEPTED SOLUTION
v-easonf-msft
Community Support
Community Support

Hi, @Anonymous 

You just need to add a new fiscal table:

 

Fisical Table = VALUES('Test table'[Fiscal])

 

Then  replace 'Test table'[Fiscal]' with ’Fisical Table[Fiscak]‘  in VAR _currentFiscal.

 

Sum value = 
VAR _currentFiscal =
    MAX ( 'Fisical Table'[Fiscal] )
VAR _previousFiscal =
    ( LEFT ( _currentFiscal, 2 ) - 1 ) & "/"
        & ( RIGHT ( _currentFiscal, 2 ) - 1 )
RETURN
    CALCULATE (
        SUM ( 'Test table'[Value] ),
        'Test table'[Fiscal] = _previousFiscal
    )

 

15.png

 

 

Best Regards,
Community Support Team _ Eason

View solution in original post

2 REPLIES 2
v-easonf-msft
Community Support
Community Support

Hi, @Anonymous 

You just need to add a new fiscal table:

 

Fisical Table = VALUES('Test table'[Fiscal])

 

Then  replace 'Test table'[Fiscal]' with ’Fisical Table[Fiscak]‘  in VAR _currentFiscal.

 

Sum value = 
VAR _currentFiscal =
    MAX ( 'Fisical Table'[Fiscal] )
VAR _previousFiscal =
    ( LEFT ( _currentFiscal, 2 ) - 1 ) & "/"
        & ( RIGHT ( _currentFiscal, 2 ) - 1 )
RETURN
    CALCULATE (
        SUM ( 'Test table'[Value] ),
        'Test table'[Fiscal] = _previousFiscal
    )

 

15.png

 

 

Best Regards,
Community Support Team _ Eason

amitchandak
Super User
Super User

@Anonymous , You only have prior year data for 1,2,3 month. And the prior year formula is working correct.

 

I done some correction to model, do do same in better manner

 

 

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

Helpful resources

Announcements
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!

October Power BI Update Carousel

Power BI Monthly Update - October 2025

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

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