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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
pbi_wannabe_exp
Regular Visitor

Calculated groups using Tabular Editor

The strange thing that I cant make one measure working. The first part of the calculation (Actual Sprint) shows correct data, but the second part which should be the previous sprint value, returns to the actual result. The result calculation should follow the red framed calculation (based on a sprint selector in PBI). I tried to modify -1 Sprint Wk CC to -5 or -3 etc., it doesn't show any difference. Any hints? Many thanks in advance!first calc.jpgsecond calc.jpgresult.jpg

1 ACCEPTED SOLUTION
v-shex-msft
Community Support
Community Support

HI @pbi_wannabe_exp,

I think this scenario may be related to the 'all' function, it will ignore all filters on the table so it may conflict with getting the current field value. (max function are calculated on the fixed all table records and get static result)

ALL function (DAX) - DAX | Microsoft Docs

Have you tried to create a variable and move this type of operation out of the current calculation row context?

formual =
VAR currValue =
    MAX ( Calendar[Sprint Year CC] )
RETURN
    CALCULATE (
        SELECTEDMEASURE (),
        FILTER ( ALL ( Calendar ), [Sprint Year CC] <= currValue )
    )

Regards,

Xiaoxin Sheng

Community Support Team _ Xiaoxin
If this post helps, please consider accept as solution to help other members find it more quickly.

View solution in original post

1 REPLY 1
v-shex-msft
Community Support
Community Support

HI @pbi_wannabe_exp,

I think this scenario may be related to the 'all' function, it will ignore all filters on the table so it may conflict with getting the current field value. (max function are calculated on the fixed all table records and get static result)

ALL function (DAX) - DAX | Microsoft Docs

Have you tried to create a variable and move this type of operation out of the current calculation row context?

formual =
VAR currValue =
    MAX ( Calendar[Sprint Year CC] )
RETURN
    CALCULATE (
        SELECTEDMEASURE (),
        FILTER ( ALL ( Calendar ), [Sprint Year CC] <= currValue )
    )

Regards,

Xiaoxin Sheng

Community Support Team _ Xiaoxin
If this post helps, please consider accept as solution to help other members find it more quickly.

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

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

April Fabric Community Update

Fabric Community Update - April 2024

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