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.
Hi,
I created a table that is similar to the one below:
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.
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
Solved! Go to Solution.
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 ) )
Best Regards,
Dale
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 ) )
Best Regards,
Dale
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
110 | |
95 | |
76 | |
65 | |
51 |
User | Count |
---|---|
146 | |
109 | |
106 | |
88 | |
61 |