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

Compete to become Power BI Data Viz World Champion! First round ends August 18th. Get started.

Reply
Anonymous
Not applicable

how to see every month in x axis

Hi, i have a graph to show 4 mesuares, two in bar, and two in lines. The bar measures show sales, and the lines measures show the budget. I want still visualizing all the months regardless the filter i chose.

 

i.e: my sales is until aug 2018 but the budget is until dec 2019. if i choose april 2018, all the x axis only show january to april, and i want to show until december in order to still seeing the budget.

1 ACCEPTED SOLUTION
Anonymous
Not applicable

If I understand your requirement then you want to be able to create a report that looks like the below:

2019-08-08_21h41_40.png

If so then you need a data model that looks something like this:

 

2019-08-08_21h42_48.png

 

In order to create the experience your looking for the trick is to incorporate a "reporting month" that you can use to drive the logic in the calculations.

 

The calculations will look something like this:

 

Sales YTD =
IF (
    MAX ( 'Date'[MonthKey] ) <= MAX ( 'Report Date'[ReportMonthKey] ),
    CALCULATE (
        SUM ( [Sales] ),
        FILTER (
            ALL ( 'Date' ),
            [MonthKey] <= MAX ( 'Date'[MonthKey] )
                && [Year] = MAX ( 'Report Date'[Report Year] )
        )
    ),
    BLANK ()
)

Budget YTD = 
CALCULATE (
    SUM ( [Budget] ),
    FILTER (
        ALL ( 'Date' ),
        [MonthKey] <= MAX ( 'Date'[MonthKey] )
            && [Year] = MAX ( 'Report Date'[Report Year] )
    )
)

I have created a sample workbook you can download.  Download Sample Workbook

 

 

View solution in original post

5 REPLIES 5
Anonymous
Not applicable

Hi - I think what you're looking to do is modify how the slicers you have on a page interact with your visual.

 

So that you can have a visual level filter for the whole year, and the slicers options do not affect the visual.

 

Details here: https://docs.microsoft.com/en-us/power-bi/visuals/power-bi-visualization-slicers#control-which-page-...

Anonymous
Not applicable

is not a slicer topic,  i think the problem is in measure, it need a dax expression in order to responde to determinated behavior.

Anonymous
Not applicable

If I understand your requirement then you want to be able to create a report that looks like the below:

2019-08-08_21h41_40.png

If so then you need a data model that looks something like this:

 

2019-08-08_21h42_48.png

 

In order to create the experience your looking for the trick is to incorporate a "reporting month" that you can use to drive the logic in the calculations.

 

The calculations will look something like this:

 

Sales YTD =
IF (
    MAX ( 'Date'[MonthKey] ) <= MAX ( 'Report Date'[ReportMonthKey] ),
    CALCULATE (
        SUM ( [Sales] ),
        FILTER (
            ALL ( 'Date' ),
            [MonthKey] <= MAX ( 'Date'[MonthKey] )
                && [Year] = MAX ( 'Report Date'[Report Year] )
        )
    ),
    BLANK ()
)

Budget YTD = 
CALCULATE (
    SUM ( [Budget] ),
    FILTER (
        ALL ( 'Date' ),
        [MonthKey] <= MAX ( 'Date'[MonthKey] )
            && [Year] = MAX ( 'Report Date'[Report Year] )
    )
)

I have created a sample workbook you can download.  Download Sample Workbook

 

 

Anonymous
Not applicable

Hi @Anonymous thanks a lot for the answer, but with a table like reportedate, and reporthmonth like filter, cant still filtering the rest of the dashboard, cause is not related with any table. 

Anonymous
Not applicable

You could use the ALL Function on your date table/column so that all dates are returned into the measure regardless of filters or slicers.

 

https://docs.microsoft.com/en-us/dax/all-function-dax

 

 

 

Helpful resources

Announcements
August Power BI Update Carousel

Power BI Monthly Update - August 2025

Check out the August 2025 Power BI update to learn about new features.

August 2025 community update carousel

Fabric Community Update - August 2025

Find out what's new and trending in the Fabric community.

Top Solution Authors