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
wilma
Frequent Visitor

Targets per category changed over the year

Hi girls and guys,

I have a target table per category that worked fine last year. When filtering on the category the target line changed in my visual.

Now I have new targets for 2021 per category and I want to show the target line moving down from 2020 to 2021 for I'm showing data from the last 12 months.

I added the year and month to the target table but all I can do now is show a sum of the targets which is changing per month, while a target line should be straight the whole year. Max and Min show the wrong values.

I'm using the line and stacked column chart because I also show a 3 months average line.

 

Anyone having experience with this?

 

Thanks for your help

1 ACCEPTED SOLUTION

Hi @amitchandak 

Thank you for your reply. I didn't know about the closingbalancemonth function (DAX newbee) but I will use it in the future.  For this particular problem it could not be used because I had some other fields (categories) to filter on. I have now solved the problem by creating 2 target measures, one for 2020 and one for 2021 and use the SWITCH function to determine which one is at hand. 

Will take some maintenance next year but there will be new targets anyhow so no problem.

Thanks again, 

Grtz,

Wilma

View solution in original post

3 REPLIES 3
amitchandak
Super User
Super User

@wilma , see if the closingbalancemonth or closingbalanceyear can help

https://www.youtube.com/watch?v=yPQ9UV37LOU

Hi @amitchandak 

Thank you for your reply. I didn't know about the closingbalancemonth function (DAX newbee) but I will use it in the future.  For this particular problem it could not be used because I had some other fields (categories) to filter on. I have now solved the problem by creating 2 target measures, one for 2020 and one for 2021 and use the SWITCH function to determine which one is at hand. 

Will take some maintenance next year but there will be new targets anyhow so no problem.

Thanks again, 

Grtz,

Wilma

Pragati11
Super User
Super User

Hi @wilma ,

 

Not able to understand everything in your query. Refer following article please:

https://community.powerbi.com/t5/Desktop/How-to-Get-Your-Question-Answered-Quickly/m-p/1447523

 

Thanks,

Pragati

Best Regards,

Pragati Jain


MVP logo


LinkedIn | Twitter | Blog YouTube 

Did I answer your question? Mark my post as a solution! This will help others on the forum!

Appreciate your Kudos!!

Proud to be a Super User!!

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.