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
Anonymous
Not applicable

Summaring data from a sumx measure in different table

Hi,

I created a table that is similar to the one below:

 

16112018 SUM AGING 1.PNG

 

Now I wrote a measure with sumx, that take values from a column An(|n is indicated by parameter) and Cm(same for m) and calculate (A-C)*P. Then i created a table with Country, Material and measure and filtered that measure is always greater than 0. Now i want to create a measure that will sum up all my values from measure(greater than 0) and i would like also to do a table with summarizing value with measure for every country.

 

16112018 SUM AGING 2.PNG16112018 SUM AGING 3.PNG

 

Is it possible? should i build table in other way, or do some other measures? Please let me know.

Thank you in advance for responce.

Radkos

1 ACCEPTED SOLUTION
v-jiascu-msft
Employee
Employee

Hi Radkos,

 

There is a solution without changing any model structure. Please refer to the demo in the attachment.

Measure =
SUMX (
    'Table1',
    VAR cValue =
        SWITCH ( [C Indicator Value], 1, 'Table1'[Cl], 2, 'Table1'[C2], BLANK () )
    VAR aValue =
        SWITCH ( [A Indicator Value], 1, [A1], 2, [A2], 3, [A3], 4, [A4], BLANK () )
    RETURN
        IF ( aValue > cValue, ( aValue - cValue ) * [P], 0 )
)

Summaring-data-from-a-sumx-measure-in-different-table

 

 

Best Regards,
Dale

Community Support Team _ Dale
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

1 REPLY 1
v-jiascu-msft
Employee
Employee

Hi Radkos,

 

There is a solution without changing any model structure. Please refer to the demo in the attachment.

Measure =
SUMX (
    'Table1',
    VAR cValue =
        SWITCH ( [C Indicator Value], 1, 'Table1'[Cl], 2, 'Table1'[C2], BLANK () )
    VAR aValue =
        SWITCH ( [A Indicator Value], 1, [A1], 2, [A2], 3, [A3], 4, [A4], BLANK () )
    RETURN
        IF ( aValue > cValue, ( aValue - cValue ) * [P], 0 )
)

Summaring-data-from-a-sumx-measure-in-different-table

 

 

Best Regards,
Dale

Community Support Team _ Dale
If this post helps, then please consider Accept it as the solution to help the 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.