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

Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Learn more

Reply
jajaAtPowerbi
Frequent Visitor

to get the last rolling 12 months ID depending on the selection on date slicer

would like to get the previous rolling 12 month ID by summarizing calendar table according to the selection of the date slicer
here below are the 2 measures :
 
end monthID R12M = VALUE(FORMAT(DATE(YEAR(MAX('Calendar'[Date])),MONTH(MAX('Calendar'[Date])), 1),"YYYYMM"))
start monthID R12M = VALUE(FORMAT(DATE(YEAR([end date]),MONTH([end date])-11, 1),"YYYYMM"))
 
why Calendar_R12Months does not summarize what i expected?
 
jajaAtPowerbi_1-1691947743695.png

 

jajaAtPowerbi_3-1691947942285.png

 


 

jajaAtPowerbi_2-1691947789291.png

 

1 ACCEPTED SOLUTION
Anonymous
Not applicable

HI @jajaAtPowerbi,

Current power bi does not support to create dynamic calculated column/table based on filter selections. They do not work on the same level and you can't use the child level to affect its parent.

Notice: the data level of power bi(from parent to child level)

Database(external) -> query table(query, custom function, query parameters) -> data model table(table, calculate column/table) -> data view with virtual tables(measure, visual, filter, slicer)

Regards,

Xiaoxin Sheng

View solution in original post

2 REPLIES 2
jajaAtPowerbi
Frequent Visitor

The data range slicer is selected from 1/12/2022 to 31/1/2023

so i would like to get the monthID counting back from 202301 till 202202

This is the expected result i would like to get but surely not want to hardcode the the value for end_monthID, start_monthID

Can anybody help?

 

jajaAtPowerbi_0-1691978186114.png

 

Anonymous
Not applicable

HI @jajaAtPowerbi,

Current power bi does not support to create dynamic calculated column/table based on filter selections. They do not work on the same level and you can't use the child level to affect its parent.

Notice: the data level of power bi(from parent to child level)

Database(external) -> query table(query, custom function, query parameters) -> data model table(table, calculate column/table) -> data view with virtual tables(measure, visual, filter, slicer)

Regards,

Xiaoxin Sheng

Helpful resources

Announcements
Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

October Power BI Update Carousel

Power BI Monthly Update - October 2025

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

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.