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
artblakey
Helper I
Helper I

End of month sales on secondary y-axis

Hi,

 

I have a bar chart showing month total sales for the year, but I would like to add a secondary y-axis on this same visual of a line chart showing only the sales volume for the last day of each month.  With my limited PowerBI knowledge, I imagine that I would create a new column in my Dates table using DAX to label each row, but I have no idea how to do this.  Could somebody please help me with this?

 

Thanks in advance.

1 ACCEPTED SOLUTION
amitchandak
Super User
Super User

@artblakey , Create a measure like this and try

 

calculate([meausre],filter(date,date[date]=lastdate(date[date])))

or
calculate([meausre],filter(date,date[date]=max(date[date])))

or
calculate([meausre],filter(date,date[date]=endofmonth(date[date])))

 

View solution in original post

5 REPLIES 5
amitchandak
Super User
Super User

@artblakey , Create a measure like this and try

 

calculate([meausre],filter(date,date[date]=lastdate(date[date])))

or
calculate([meausre],filter(date,date[date]=max(date[date])))

or
calculate([meausre],filter(date,date[date]=endofmonth(date[date])))

 

Hi @amitchandak 

 

Thanks, but just to clarify, I only have to use one of your three suggested measures?

 

Also, what do I put in place of [measure]?  Do I have to create another measure to place here?

 

I have limited knowledge of DAX so appreciate your clarification.

 

Thanks.

hi @artblakey 

You could use use one of the three suggested measures, the logic is same for them.

If you still have the problem, please share your sample pbix file for us have a test, that will be a great help.

Please see this post regarding How to Get Your Question Answered Quickly:
https://community.powerbi.com/t5/Community-Blog/How-to-Get-Your-Question-Answered-Quickly/ba-p/38490

 

Regards,

Lin

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

Hi @v-lili6-msft 

 

Thanks for your response, I will give those a try.

 

But I don't understand what I put in place of "[measure]", in those measures suggested?  Do I have to create another measure to place here?

 

Thanks.

Hey @artblakey ,

 

you don't have to create a measure, you can replace

[measure]

by using this DAX expression

CALCULATE(SUM('tablename'[salescolumn]))

 

Regards,

Tom



Did I answer your question? Mark my post as a solution, this will help others!

Proud to be a Super User!
I accept Kudos 😉
Hamburg, Germany

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.