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

The FabCon + SQLCon recap series starts April 14th at 8am Pacific. If you’re tracking where AI is going inside Fabric, this first session is a can't miss. Register now

Reply
Anonymous
Not applicable

Previous Period using Calendar

I have a simple formula that worked in another file but doesn't seem to work in my current one. The same formula works in one workbook but not the other and im scratching my head on why it isn't working.

PY $ = VAR Previous = SELECTEDVALUE('Date Table'[Calendar YearWeekNumber])-1
RETURN
CALCULATE(
    [Gross Sales],
    'Date Table'[Calendar YearWeekNumber]=Previous)

 

1 ACCEPTED SOLUTION
ajaybabuinturi
Resident Rockstar
Resident Rockstar

Hi @Anonymous,
I reviewed the BI report. What happend over there is used two different columns in your model, used Calendar Year column to the visual and Calendar YearNumber for DAX logic. Because of that your getting BLANK values in the visual. You can refer below snippets and make sure that both visual fields and DAX logic columns should be same.

ajaybabuinturi_0-1750845589418.png

ajaybabuinturi_1-1750845633618.png

Thanks,
If you found this solution helpful, please consider giving it a Like👍 and marking it as Accepted Solution✔. This helps improve visibility for others who may be encountering/facing same questions/issues.

View solution in original post

4 REPLIES 4
ajaybabuinturi
Resident Rockstar
Resident Rockstar

Hi @Anonymous,
I reviewed the BI report. What happend over there is used two different columns in your model, used Calendar Year column to the visual and Calendar YearNumber for DAX logic. Because of that your getting BLANK values in the visual. You can refer below snippets and make sure that both visual fields and DAX logic columns should be same.

ajaybabuinturi_0-1750845589418.png

ajaybabuinturi_1-1750845633618.png

Thanks,
If you found this solution helpful, please consider giving it a Like👍 and marking it as Accepted Solution✔. This helps improve visibility for others who may be encountering/facing same questions/issues.

Anonymous
Not applicable

Interesting interaction, thank you for the help.

ajaybabuinturi
Resident Rockstar
Resident Rockstar

Hi @Anonymous,
This should be work however could you please share some sample data which this DAX logic is not working. So that will try to provide the solution. 

 

Anonymous
Not applicable

Helpful resources

Announcements
New to Fabric survey Carousel

New to Fabric Survey

If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.

Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.

Join our Fabric User Panel

Join our Fabric User Panel

Share feedback directly with Fabric product managers, participate in targeted research studies and influence the Fabric roadmap.

March Power BI Update Carousel

Power BI Community Update - March 2026

Check out the March 2026 Power BI update to learn about new features.