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

Join us for an expert-led overview of the tools and concepts you'll need to become a Certified Power BI Data Analyst and pass exam PL-300. Register now.

Reply
tqn3728
New Member

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
Solution Supplier
Solution Supplier

Hi @tqn3728,
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
Solution Supplier
Solution Supplier

Hi @tqn3728,
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.

Interesting interaction, thank you for the help.

ajaybabuinturi
Solution Supplier
Solution Supplier

Hi @tqn3728,
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. 

 

Helpful resources

Announcements
Join our Fabric User Panel

Join our Fabric User Panel

This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.

June 2025 Power BI Update Carousel

Power BI Monthly Update - June 2025

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

June 2025 community update carousel

Fabric Community Update - June 2025

Find out what's new and trending in the Fabric community.