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

Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.

Reply
vpsoini
Helper I
Helper I

Showing growth only on full months (combined line & bar visual)

Hi,

 

I'm using combined line & bar graph to show sales this year per month, compares to same period last year and calculating the growth between those. The result looks like:

vpsoini_0-1644993690546.png

Nice growth or what! 😉

 

The problem here is that I would like to have the growth calculated (and visualized) only for full months, since the numbers are just nonsense after that. As you can see the current month (2022 02) has negative growth today, since the growth measure is comparing partial month this year to full month last year and rest of the year flatlines into -100% for same reason.

 

My growth measure is simple:  Growth% = DIVIDE ( [Sales Total] - [Sales last year] , [Sales last year] ) , where those measures are just what the name says.   

 

What I would need is simple IF(?) to check if the month is finished or not and if it's not yet finished, the growth value should be empty (would that stop drawing the line in the graph?) or at least zero.

 

I was thinking about LASTMONTH or MONTH < MONTH(Today()) kind of solutions, but didn't get it working right.

 

Any help is once again very appreciated.

 

1 ACCEPTED SOLUTION
amitchandak
Super User
Super User

@vpsoini , Try measure like

if(eomonth(Max(Date[Date]),0) >=today(), blank(), [Growth% ])

View solution in original post

1 REPLY 1
amitchandak
Super User
Super User

@vpsoini , Try measure like

if(eomonth(Max(Date[Date]),0) >=today(), blank(), [Growth% ])

Helpful resources

Announcements
LearnSurvey

Fabric certifications survey

Certification feedback opportunity for the community.

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.