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

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
WINNINGATTITUDE
Frequent Visitor

filter by current selection

Hey,

I am brand new here, forgive me for being a newbie.

I have a very simple issue, I am trying to get power BI to give me the value for fis year 2017 based on the current selection which is 2018, the expression below works perfect except it gives me the total units for all of 2017 fis year.

I am looking at the sum(units) which is 2018 fis year, and only 34 weeks so far, but this formula in a table is giving me a 52 week result for 2017.

can anyone assist?

thank you

 

2017.PNG

5 REPLIES 5
Ashish_Mathur
Super User
Super User

Hi,

 

The question becomes easy to solve if you have a Date column in your base data Table.  If not, then do you atleast have a Year and Month column (from where i will then build a date column).  The existene of a date column will all us to use time intelligence functions such as SAMEPERIODLASTYEAR().


Regards,
Ashish Mathur
http://www.ashishmathur.com
https://www.linkedin.com/in/excelenthusiasts/

Thank you for your response, I've learned enough excel and enough Microsoft power BI to get myself some beautiful dashboards.

 

My challenges that I think my source file needs more preparation as it's all text and number columns.

 

Presently my need is only for the year, can a year be filtered as a date column?

 

If you can provide some advice and how to prepare my file in power query in order to get this result it would really help me a lot.

 

Please note I'm extremely new to all of this and even though I have been able to create some beautiful dashboards, i am  realizing my source file is a problem for Microsoft power BI to do advanced stuff with DAX. 

 

If you have time to provide some ideas to a person who sort of very new to this it would  appreciated, if not I fully understand

Hi,

 

It will be ideal to have a date column.  If not, there should be a month column so that with the year and month column, a date field can be created.


Regards,
Ashish Mathur
http://www.ashishmathur.com
https://www.linkedin.com/in/excelenthusiasts/
WINNINGATTITUDE
Frequent Visitor

sorry, i need to know how to add a filter to the above expression so that when 2018 is selected onlyhas 34 fiscal weeks that then this expression will give 2017 units also but only for teh same 34 weeks in 2017.

 

thank you

WINNINGATTITUDE
Frequent Visitor

sorry, i need to know how to add a filter to the above expression so that when 2018 is selected onlyhas 34 fiscal weeks that then this expression will give 2017 units also but only for teh same 34 weeks in 2017.

 

thank you

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

December 2025 Power BI Update Carousel

Power BI Monthly Update - December 2025

Check out the December 2025 Power BI Holiday Recap!

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.