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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
edcarden
Helper I
Helper I

Can a measure bee added to a visualization more than once where in the second measure is for PY

Let's say in my dataset I have a measure called Total Units Sold This Year that I add to me visualization on a report.  I would like to also add Total Units Sold PY (Prior Year) but I don;t have a measure like that so is it possible in PowerBI to added the measure a second time and edit it to show the same value buit for the prior year?

 

Or would the dataset neeed to include another measure named Total Units Sold Last Year?  I'm thinking that if you want the same value for a different period you have to include in your data set a measutre for that because I don;t see anyway in PowerBi to do something like this =Totals Units Sold (This Year - 12 months).

 

I'm not looking for the explination of how to do this if it's possible (a link to info on how to do it is fine), I just want to find out if this is possible in power BI or not. 

4 REPLIES 4
Anand24
Super User
Super User

Hi @edcarden ,
Is it possible in PowerBI to added the measure a second time and edit it to show the same value buit for the prior year? - No, it is not possible this way in Power BI

You will need create a new measure with below dax and use it in your visualization:

Total Units Sold PY = CALCULATE(SUM('TableName'[Total_Units]), SAMEPERIODLASTYEAR('TableName'[Date]))

 

PBI_SuperUser_Rank@1x.png  

Give a Thumbs Up if this post helped you in any way and Mark This Post as Solution if it solved your query !!!

Proud To Be a Super User !!!
LinkedIn

v-zhangti
Community Support
Community Support

Hi, @edcarden 

 

Can you provide sample data for testing? Sensitive information can be removed in advance. What kind of expected results do you expect? You can also show it with pictures or Excel. I look forward to your response.

 

Best Regards,

Community Support Team _Charlotte

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Daryl-Lynch-Bzy
Resident Rockstar
Resident Rockstar

Hi @edcarden - I would suggest using Calculation Group.  A calculation item will allow you to switch the filter context to prior year.  

(1) Mind-Blowing Power BI Update: Model View enhancements! - YouTube 

(1) REDUCE the # of measures with Calculation Groups In Power BI - YouTube

Thanks for replying Daryl but someone else already answered my question elsewhere on this.  basially what I need to do is add another item to the dataset. 

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

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

Top Solution Authors
Top Kudoed Authors