Forum Discussion
My line chart data points will not connect
- 6 years ago
Hi Anonymous ,
Are your Line chart and tables look like following?
We can create a measure to meet you requirement:
aggreFromOtherTable = SWITCH ( SELECTEDVALUE ( 'Table'[Column1] ), "A", SUM ( 'Table (2)'[Column2] ), "B", SUM ( 'Table (3)'[Column2] ), "D", SUM ( 'Table (4)'[Column2] ) )If it doesn't meet your requirement, kindly share your sample data and expected result to me if you don't have any Confidential Information. Please upload your files to One Drive and share the link here.
BTW, pbix as attached.Best regards,
Community Support Team _ Dong Li
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi Anonymous ,
Are your Line chart and tables look like following?
We can create a measure to meet you requirement:
aggreFromOtherTable =
SWITCH (
SELECTEDVALUE ( 'Table'[Column1] ),
"A", SUM ( 'Table (2)'[Column2] ),
"B", SUM ( 'Table (3)'[Column2] ),
"D", SUM ( 'Table (4)'[Column2] )
)
If it doesn't meet your requirement, kindly share your sample data and expected result to me if you don't have any Confidential Information. Please upload your files to One Drive and share the link here.
BTW, pbix as attached.
Best regards,
Community Support Team _ Dong Li
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
- Anonymous6 years agoNot applicable
Many thanks v-lid-msft
This worked beautifully.
Would you be able to share the logic behind the measure? I have read up but I cannot seem to grasp it.
Thanks as well parry2k for your help.
Thank you
Water
- v-lid-msft6 years agoCommunity Support
Hi Anonymous ,
Of course we will explain this measure, First of all, there are three values from the 'Table'[Column1], we use SELECTEDVALUE to identify what is the value of x-axis and use SWITCH to get different result based on the value of 'Table'[Column1], when the x-axis is A, we calculate the sum value fo 'Table (2)', if the value of x-axis changed, we calculate for another table, Then we are able to show different value for differnt x-axis values. We can also change the SUM formula to another formula to calculate other value you want. The reason that those dots can connect is because the values of dots are come from the same measure.
aggreFromOtherTable = SWITCH ( SELECTEDVALUE ( 'Table'[Column1] ), "A", SUM ( 'Table (2)'[Column2] ), "B", SUM ( 'Table (3)'[Column2] ), "D", SUM ( 'Table (4)'[Column2] ) )Best regards,
Community Support Team _ Dong Li
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.