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
Leyla
Regular Visitor

Calculate the sum of a measure by text field

I have the list of Regions, functions, the related BPEs and values for the current and previous quarters. By using Measure I created formulas that first compare current vs previous quarter for values, if change happened then it assigns 1, if no change 0. The count of changes is stored as a Measure not as a column within the table. Now I want to summarise by Region and the function the number of changes, i.e. how many 1 I have for Region 1 and function1, then for Region2, function2, etc. As calculated measures are not tables I cannot use Sum formula as it requires to reference to the table but when I reference to a table it does not have the calculated leasure as a separate column to be chosen for summing. Currently the calculated Measure shows only 1 or 0 but I need the sum by Region and Function.

Capture.PNG

1 ACCEPTED SOLUTION
Anonymous
Not applicable

@Leyla,

Create the following measure in your table. If the DAX doesn't return your expected result, please share sample data of your table which we can copy and paste here. Also please post DAX formula of [Count any change] here.

Measure  =
SUMX (
    SUMMARIZE (
        'Append1',
        'Append1'[Regions],
        'Append1'[functions],
        "temp", [Count any change]
    ),
    IF ( ISERROR ( [temp] ), 0, [temp] )
)



Regards,
Lydia

 

View solution in original post

2 REPLIES 2
Anonymous
Not applicable

@Leyla,

Create the following measure in your table. If the DAX doesn't return your expected result, please share sample data of your table which we can copy and paste here. Also please post DAX formula of [Count any change] here.

Measure  =
SUMX (
    SUMMARIZE (
        'Append1',
        'Append1'[Regions],
        'Append1'[functions],
        "temp", [Count any change]
    ),
    IF ( ISERROR ( [temp] ), 0, [temp] )
)



Regards,
Lydia

 

Thanks a lot, this solved my problem. However, would be greatful if you could explain the meaning of "temp".

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.

Top Solution Authors