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

Don't miss out! 2025 Microsoft Fabric Community Conference, March 31 - April 2, Las Vegas, Nevada. Use code MSCUST for a $150 discount. Prices go up February 11th. Register now.

Reply
quickbi
Helper I
Helper I

Last 12 month chart

Hi All,

I want to create a last 12 months revenues chart depending on the date selected in a Year-month selector.

I create a StartDate measure:

 

StartDate = 
VAR SelectedDate = [SelectedDate]-1
VAR StartDate = EDATE([SelectedDate], -11) -- Calcular la fecha de inicio (hace 11 meses desde la fecha seleccionada)
RETURN
    StartDate

 

Another to Calculate Only Revenues:

 

PL_Revenues_Amount = 
CALCULATE(
    sum('PL Ledger'[total_balance]),
    'Income statement'[level1 order] in {10}
    
)

 

and finaly the total Amount for last 12M:

 

TotalRevenueLast12Months = 
VAR SelectedDate = [SelectedDate] -- Suponiendo que tienes una medida que selecciona la fecha actual
VAR StartDate = EDATE(SelectedDate, -11) -- Calcular la fecha de inicio (hace 11 meses desde la fecha seleccionada)
RETURN
    CALCULATE(
        [PL_Revenues_Amount], -- Sumar la columna de ingresos
        DATESBETWEEN(
            'Calendar'[Date],
            StartDate,
            EOMONTH(SelectedDate, 0)
        )
        --'Income statement'[Level1] IN {"Net Revenue"} -- Filtra solo las cuentas 70000 y 70001
    )

 

It works in a table value mode, but I want to show a bar chart with last 12 Months, but unfortunate only shows the months I selected

quickbi_0-1725180589941.png

How to do that?

Thanks in advance everyone



 

1 ACCEPTED SOLUTION
Ashish_Mathur
Super User
Super User

Hi,

Not sure of what you want but see if my solution to a similar probem in the attached file helps.


Regards,
Ashish Mathur
http://www.ashishmathur.com
https://www.linkedin.com/in/excelenthusiasts/

View solution in original post

1 REPLY 1
Ashish_Mathur
Super User
Super User

Hi,

Not sure of what you want but see if my solution to a similar probem in the attached file helps.


Regards,
Ashish Mathur
http://www.ashishmathur.com
https://www.linkedin.com/in/excelenthusiasts/

Helpful resources

Announcements
Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!

Jan25PBI_Carousel

Power BI Monthly Update - January 2025

Check out the January 2025 Power BI update to learn about new features in Reporting, Modeling, and Data Connectivity.

December 2024

A Year in Review - December 2024

Find out what content was popular in the Fabric community during 2024.