cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
Matty Helper II
Helper II

Highlight current week in column chart...

Hi Team,

 

I have a time series column chart in Power BI with dates along the x axis.  To help readability, a user has requested a means of highlighting the current day's date.

 

If I was to do this in Excel, I would add a vertical line using error bars to highlight the current date, but I don't think Power BI has this functionality currently.

 

Anyone manage to achieve someing akin to this in Power BI?  If so, how did you achieve it?

 

Cheers,

 

Matty  

1 ACCEPTED SOLUTION

Accepted Solutions
Microsoft v-danhe-msft
Microsoft

Re: Highlight current week in column chart...

Hi @Matty,

Based on my research,there is no OOTB feature to add this kind of line in Power BI charts currently. To work around the issue, you can create a measure to only show additional column bars for current week.  

1.I have entered some sample data like the picture below:

(.PNG2.

2.Create a measure.

Measure = IF(WEEKNUM(TODAY())=WEEKNUM(CALCULATE(MAX('Table1'[Date]))),CALCULATE(SUM(Table1[Value])),BLANK())

3.Create a Column chart and add the related fields, you can get the result like the picture below:

).PNG

For your requirement, you could also vote for this idea: https://ideas.powerbi.com/forums/265200-power-bi-ideas/suggestions/19550122-vertical-reference-lines...

 

You can also download the PBIX file to have a view.

https://www.dropbox.com/s/53j7x7t7qojhrj0/Highlight%20current%20week%20in%20column%20chart.pbix?dl=0

 

Regards,

Daniel He

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

View solution in original post

3 REPLIES 3
Microsoft v-danhe-msft
Microsoft

Re: Highlight current week in column chart...

Hi @Matty,

Based on my research,there is no OOTB feature to add this kind of line in Power BI charts currently. To work around the issue, you can create a measure to only show additional column bars for current week.  

1.I have entered some sample data like the picture below:

(.PNG2.

2.Create a measure.

Measure = IF(WEEKNUM(TODAY())=WEEKNUM(CALCULATE(MAX('Table1'[Date]))),CALCULATE(SUM(Table1[Value])),BLANK())

3.Create a Column chart and add the related fields, you can get the result like the picture below:

).PNG

For your requirement, you could also vote for this idea: https://ideas.powerbi.com/forums/265200-power-bi-ideas/suggestions/19550122-vertical-reference-lines...

 

You can also download the PBIX file to have a view.

https://www.dropbox.com/s/53j7x7t7qojhrj0/Highlight%20current%20week%20in%20column%20chart.pbix?dl=0

 

Regards,

Daniel He

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

View solution in original post

Matty Helper II
Helper II

Re: Highlight current week in column chart...

Thanks for responding, Daniel.

 

Your idea works, but it isn't quite what I'm after.  I have voted for idea via the link you sent.

 

Thanks again.

 

Matty 

darons
Regular Visitor

Re: Highlight current week in column chart...

Hi Matty,  I created two sets of values which I used to evaluate if the data is in the current week or not.

 

Current Week = if(Weekly[num]=Weekly[Current_WeeK],1,0)

Current Week  = if(Weekly[Current Week]=1,Weekly[Data_value],0)

Running= if(Weekly[Current Week]=0,Weekly[Data_Value],0)

 

Capture.JPGCapture.JPG

Helpful resources

Announcements
New Ranks Launched March 24th!

New Ranks Launched March 24th!

The time has come: We are finally able to share more details on the brand-new ranks coming to the Power BI Community!

‘Better Together’ Contest Finalists Announced!

‘Better Together’ Contest Finalists Announced!

Congrats to the finalists of our ‘Better Together’-themed T-shirt design contest! Click for the top entries.

Arun 'Triple A' Event Video, Q&A, and Slides

Arun 'Triple A' Event Video, Q&A, and Slides

Missed the Arun 'Triple A' event or want to revisit it? We've got you covered! Check out the video, Q&A, and slides now.

Join THE global Microsoft Power Platform event series.

Join THE global Power Platform event series.

Attend for two days of expert-led learning and innovation on topics like AI and Analytics, powered by Dynamic Communities.

Community Summit North America

Community Summit North America

Innovate, Collaborate, Grow. The top training and networking event across the globe for Microsoft Business Applications

Top Solution Authors