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

Grow your Fabric skills and prepare for the DP-600 certification exam by completing the latest Microsoft Fabric challenge.

Reply
DBQuser1218
New Member

R12 Month Questions

I am newer to PBI and having problems with R12 month DAX code. 

 

I am trying to find the rolling 12 month of concrete qty and want to see what they are monthly. I am using DAX code-- 

 

Last 12 Months =
CALCULATE ( [Concrete Qty],
      DATESINPERIOD ( 'Ticket'[Ticketed Date],          -- returns period from date column
                      MAX ( 'Ticket'[Ticketed Date] ),  -- starting from MAX date
                      -12,                   -- shifting it back 12 intervals
                      MONTH                  -- each interval being a month
      )
)

 

When I put these in a matrix with total Concrete QTY I am getting the same values. 

 

DBQuser1218_0-1698506078948.png

Can anyone tell me what I am doing wrong? 

 

1 REPLY 1
Dangar332
Super User
Super User

HI, @DBQuser1218 

 

just adjust your table and  column name

use below code instead of  MAX ( 'Ticket'[Ticketed Date] )


calculate( MAX ( 'Ticket'[Ticketed Date] ),allexcept('yourtablename','ticket'[yearcolumnname]))

Helpful resources

Announcements
RTI Forums Carousel3

New forum boards available in Real-Time Intelligence.

Ask questions in Eventhouse and KQL, Eventstream, and Reflex.

MayPowerBICarousel1

Power BI Monthly Update - May 2024

Check out the May 2024 Power BI update to learn about new features.

Europe Fabric Conference

Europe’s largest Microsoft Fabric Community Conference

Join the community in Stockholm for expert Microsoft Fabric learning including a very exciting keynote from Arun Ulag, Corporate Vice President, Azure Data.