The ultimate Fabric, Power BI, SQL, and AI community-led learning event. Save €200 with code FABCOMM.
Get registeredCompete to become Power BI Data Viz World Champion! First round ends August 18th. Get started.
Hi,
I have 3 seperate data tables. A data point from each of these tables is to be used on my line chart.
I have 1 extra common table, where I want my categorical axis to come from.
This common table is connected to each 3 data tables in a many to one relationship.
However when I plot my 3 seperate data points, with the axis coming from the common table, the line chart does not connect.
Can anyone help please?
Solved! Go to Solution.
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.
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
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.
Just an update on this:
I have tried googling to see if I can find a similar issue but I can't.
Any help is greatly appreciated.
Thanks
Water
@Anonymous can you share how you are putting measure on values section of line chart?
Any sample data with example would be great.
Subscribe to the @PowerBIHowTo YT channel for an upcoming video on List and Record functions in Power Query!!
Learn Power BI and Fabric - subscribe to our YT channel - Click here: @PowerBIHowTo
If my solution proved useful, I'd be delighted to receive Kudos. When you put effort into asking a question, it's equally thoughtful to acknowledge and give Kudos to the individual who helped you solve the problem. It's a small gesture that shows appreciation and encouragement! ❤
Did I answer your question? Mark my post as a solution. Proud to be a Super User! Appreciate your Kudos 🙂
Feel free to email me with any of your BI needs.
Hi Parry2k,
I am using calculated columns and not measures, if that is useful information?
I have 3 databases/tables:
1. I calculate the figure for each year (ranging from 2009 to 2017)
2. I calculate the 2018 performance
3. I calculate the 2019 YTD performance
I then connect each of these 3 tables individually with my "joiner" table. I use my "joiner" table as my x-axis but the line chart just shows dots and doesn't connect them.
Thanks
Water
@Anonymous it is very hard to figure out without looking what you measure are ? Can you share pbix file and remove any sensitive information before sharing.
Subscribe to the @PowerBIHowTo YT channel for an upcoming video on List and Record functions in Power Query!!
Learn Power BI and Fabric - subscribe to our YT channel - Click here: @PowerBIHowTo
If my solution proved useful, I'd be delighted to receive Kudos. When you put effort into asking a question, it's equally thoughtful to acknowledge and give Kudos to the individual who helped you solve the problem. It's a small gesture that shows appreciation and encouragement! ❤
Did I answer your question? Mark my post as a solution. Proud to be a Super User! Appreciate your Kudos 🙂
Feel free to email me with any of your BI needs.