Showing results for 
Search instead for 
Did you mean: 
smartbi123 Regular Visitor
Regular Visitor

Difference between time period & relative date


         I have few questions regarding dashboard.

         First, If I have sales by orderDate bar chart (see attached image). how to calculate month to month difference for sales(M/M Sales or Q/Q Sales, W/W Sales etc) in PowberBI?  

        Second, In Tableau it has relative date that allows to display last n time period data. For example, want to display last 2 week sales or last 12 months sales. How this can happen in powerBI?

          Third, how can I display x axis label as the below chart. Also how to have label for each week and M/M sales on the top of bar. 

           Many Thanks!

x axis label format.PNGx axis label format.PNG

jbarnes Member

Re: Difference between time period & relative date

so 3 points:


1 - I think we'd need to see your data, but you can deffo do the min/max difference etc within a measure.


2 - Powerbi has this functionality in the slicer visual, using the little dropdown you can pick lots of difffent options. the visual has to recognise your data as a date though for this to work. Also, if you cant see the drop down, make the visual bigger.



3 - you X-Axis is already showing? week14, week15 etc. if you mean the Y-Axis, go into the format tab for the visual and use the toggle to turn it on.


Microsoft v-yulgu-msft

Re: Difference between time period & relative date

Hi @smartbi123 ,



Please refer to suggestion mentioned here.



Both slicer and Visual/Page/Report level filters provide "Relative" option.

1.PNG     2.PNG



To show data label on the top of bar, please set its "position" to "Outside End" under format pane.



If you want to display data label formatted as KPI indicator, as drawn in above screenshot, I'm afraid it is not achievable now.


Best regards,

Yuliana Gu

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

Re: Difference between time period & relative date

Hi good morning Gu,

                Thanks for reply. In the image that is from Tableau. In power BI Same chart, x axis only show in week numbers(please see attachment). I want to show week 1, week2, not just 1,2.label in powerBI.PNG

smartbi123 Regular Visitor
Regular Visitor

Re: Difference between time period & relative date

Hi Gu,

            We are moving from Tableau to PowerBI, and struggling with PowerBI very badly. I need your help and appreicate your help!!! I still have questions regarding Difference between current time period and Prev time period, and time filters. Please see attached image which is what I am looking for. I want to two times fileters (slicers). One main time slicer includes three value: Quarterly, Weekly and Daily. This slicer can filter all charts. For example, when select quaterly filter, the trend chart will display overall Quarterly mergin% trend for each subcategory. Second sub slicer is relative date. I want to it only works for yellow bar char(marge% by subcategory). when select this year,month or week, the chart only displys current year,month week data. If select last 3 weeks, it displaly three seperated bar charts for past 3 weeks. Just as showed in the below image.

                      I have the following quesions for powerBI. first, I created a yellow bar (margin% by subcategory) in powerBI, the relative date slicer doen'st work for this bar. When I select last n time period, the chart showed blank or still only single chart. Second, How can I set up a main silicer which include Quaterly, Weekly an Daily to control all charts in the dashboard. Third, how can I do part4 in the image. I saw your example M/M% in your last repley. I tried it, and it didn't work out in this case. 

                      Could you please use Adventureworks sample dataset( margin%, subcategory and order date) demo your answers. 

                       Many thanks!!!





Helpful resources

Coming Soon: T-Shirt Design Contest

Coming Soon: T-Shirt Design Contest

Keep your eyes open for our upcoming T-shirt design contest!

Meet the 2020 Season 1 Power BI Super Users!

Meet the 2020 Season 1 Power BI Super Users!

It’s the start of a new Super User season! Learn all about the new Super Users and brand-new tiered recognition system.

Super User Challenge: Can You Solve These?

Super User Challenge: Can You Solve These?

We're celebrating the start of the New Super User season with our first ever Super User 'Can You Solve These?' challenge.

Power Platform Online Conference

Power Platform Online Conference

Join us for the first ever Power Platform Online Conference!

Top Solution Authors
Top Kudoed Authors