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! Request now

Reply
Kavelar1
Frequent Visitor

T12 Flex-Flow Calculation

Hi again,

 

I am back with another issue. I am trying to display a T-12 based flex-flow calculation with a disconnected date on the x-axis for a bar chart. At the moment, when I apply my T12 filter what appears is, let's say for last month in which I want to see the comparison vs last year's same month, it only carries out the calculation for the prior year's months and plots it for such while omiting "the most recent" 12 months.  Below is my flex calculation and a Disconnected T12 filter measure from my calculation group that I am using on my other measures that correctly show T12-based calculations. As a heads up "'T12,2Y etc Purposes Dates'[Date]" is the table that is disconnected from the dates and is used on the other working measures for the T12,2Y etc filters. 

Any input would be very helpful.

Thanks!

 

Flex (-) % vs Prior Year =
VAR CurrentRevenue =
    CALCULATE(
        [Revenue],
        'Main Table'[Period] = "MTDCY"
    )

VAR PriorRevenue =
    CALCULATE(
        [Revenue],
        'Main Table'[Period] = "MTDCY",
        SAMEPERIODLASTYEAR('Date'[Date])
    )

VAR CurrentGOP =
    CALCULATE(
        [GOP],
        'Main Table'[Period] = "MTDCY"
    )

VAR PriorGOP =
    CALCULATE(
        [GOP],
        'Main Table'[Period] = "MTDCY",
        SAMEPERIODLASTYEAR('Date'[Date])
    )

VAR RevenueVariance = CurrentRevenue - PriorRevenue
VAR GOPVariance = CurrentGOP - PriorGOP

RETURN
IF(
    RevenueVariance >= 0,
    Blank(),
    (1 - DIVIDE(GOPVariance, RevenueVariance))
)




Disconnected T12 =
VAR _max = MAXX(ALLSELECTED('Date'), 'Date'[Date])
VAR _monthNumber = MONTH(_max)
RETURN
CALCULATE(
    Calculate(selectedmeasure(), DATESINPERIOD('Date'[Date],max('date'[date]),-12,month)),
    USERELATIONSHIP('T12,2Y etc Purposes Dates'[Date], 'Main Table'[Date])


1 ACCEPTED SOLUTION

Hi,

See if my solution in the attached file helps.


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

View solution in original post

6 REPLIES 6
v-venuppu
Community Support
Community Support

Hi @Kavelar1 ,

I hope the information provided is helpful.I wanted to check whether you were able to resolve the issue with the provided solutions.Please let us know if you need any further assistance.

Thank you.

v-venuppu
Community Support
Community Support

Hi @Kavelar1 ,

May I ask if you have resolved this issue? Please let us know if you have any further issues, we are happy to help.

Thank you.

v-venuppu
Community Support
Community Support

Hi @Kavelar1 ,

Thank you for reaching out to Microsoft Fabric Community.

Thank you @Ashish_Mathur for the prompt response.

I wanted to check if you had the opportunity to review the information provided and resolve the issue..?Please let us know if you need any further assistance.We are happy to help.

Thank you.

Ashish_Mathur
Super User
Super User

Hi,

Your question is not clear.  Share some data, explain the question and show the expected result.  Share data in a format that can be pasted in an MS Excel file.


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

Apologies. The top view is what it should look like but am using the main date table. The bottom view is what ends up appearing when placing the Disconnected T12 filter into the visual while plotting with the disconnected date table 'T12,2Y etc Purposes Dates.' The thing I am attempting to achieve is to allowing the user to select a year/month and see the flex-flow calculations for the last 12 months of the selected date as opposed to the most recent accesible data. 

 

Kavelar1_0-1755806533832.png

 

MonthRevenueGOP
1/1/202395,79525,684
2/1/202380,86030,215
3/1/2023134,88644,039
4/1/202386,26538,529
5/1/2023117,19440,238
6/1/2023124,13152,381
7/1/2023140,26354,150
8/1/202396,02332,657
9/1/2023121,09030,593
10/1/2023147,22164,547
11/1/2023144,82052,520
12/1/202380,76926,418
1/1/2024139,73535,379
2/1/2024142,95542,340
3/1/2024144,92543,217
4/1/2024147,96957,212
5/1/202485,31131,735
6/1/2024133,70755,707
7/1/2024108,69330,941
8/1/2024105,65834,678
9/1/202498,43128,195
10/1/202482,74733,187
11/1/2024139,15046,619
12/1/2024145,72542,491

 

 

 

Flow (+) % vs Prior Year =
VAR CurrentRevenue =
    CALCULATE(
        [Revenue],
        'Main Table'[Period] = "MTDCY"
    )

VAR PriorRevenue =
    CALCULATE(
        [Revenue],
        'Main Table'[Period] = "MTDCY",
        SAMEPERIODLASTYEAR('Date'[Date])
    )

VAR CurrentGOP =
    CALCULATE(
        [GOP],
        'Main Table'[Period] = "MTDCY"
    )

VAR PriorGOP =
    CALCULATE(
        [GOP],
        'Main Table'[Period] = "MTDCY",
        SAMEPERIODLASTYEAR('Date'[Date])
    )

VAR RevenueVariance = CurrentRevenue - PriorRevenue
VAR GOPVariance = CurrentGOP - PriorGOP

RETURN
IF(
    RevenueVariance <= 0,
    BLANK(),
    DIVIDE(GOPVariance, RevenueVariance)
)
 
 
Thanks!

Hi,

See if my solution in the attached file helps.


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

Helpful resources

Announcements
November Power BI Update Carousel

Power BI Monthly Update - November 2025

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

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!

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.

Top Solution Authors
Top Kudoed Authors