March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount! Early bird discount ends December 31.
Register NowBe one of the first to start using Fabric Databases. View on-demand sessions with database experts and the Microsoft product team to learn just how easy it is to get started. Watch now
Hi all,
I'va been able thanks to some of you to create a table based on a Field, that allows me to filter through the coloumn of my file.
It's a simple file with the data of Gas and power across different country:
This is the result achieved, as you can see the table on the right is displaying the data selected in the filter on the right:
Now I would like to have a line chart showing the data selected in a graphical way, adding and removing lines based on the selected values through the filter that are populating the table...
I've tried putting the date in the x axis and the field that I've created on the Y axis but is not showing nothing...
If I'm adding on the y axis the data from the excel file instead of the field that I've created the data are shown but are not responsive with the filters.
Can someone please help me?
Hope to have been clear, please let me know if any other detail is needed and many thanks to anyone that will help me.
Best Reagards
Fabio
Solved! Go to Solution.
@Fabio_B This seems to work for me. See PBIX attached below signature. Just unpivot the columns and use the Attribute column as your slicer.
@Fabio_B Just put the Attribute column in the legend.
Hi @Greg_Deckler, thanks for your feedback, let me try to be more clear.
Actually i have a table like this:
I've created a filter that allows me to filter by column using a "Fileds" (New Parameter - Fileds), achieving this result:
Now as you can see the table on the right, is showing only the selected data (in this case year 2019 and Italy power and gas values).
I would like to have a line chart showing the same data in a graphical form, something like this:
The above chart has been created to have an indication of the desidered output, placing on Y axis years and months. On the x axix i've placed the data.
This chart is not responsive, so if i'm deselecting one of the two values, it won't change.
The same if i'm selecting some more data.
The desiderata is to have a chart that shows only the data reported on the table close to the filter on picture 2, adjusting them according to the filter selection as per what the table is actually already doing.
Can you please help me?
Many thanks
Fabio
@Fabio_B The big issue is that unless you post your sample data as text it can't be copied and a solution created. Now, all that said, if you unpivoted your data columns I feel like this problem would be solved immediately. Right-click your Month-Year column in Power Query Editor and select Unpivot other columns.
Sorry @Greg_Deckler i haven't understood that you need the raw data.
Please find attached the file that i'm using as database for energy values:
Month - Year | ITALY Power €/MWh | ITALY GAS €/MWh | France Power €/MWh | France GAS €/MWh |
gen-19 | 67,65 | 23,67 | 61,16 | 21,92 |
feb-19 | 57,67 | 20,46 | 46,62 | 18,32 |
mar-19 | 52,88 | 18,28 | 33,86 | 15,80 |
apr-19 | 53,35 | 18,60 | 38,08 | 15,11 |
mag-19 | 50,67 | 17,15 | 37,21 | 13,52 |
giu-19 | 48,58 | 14,21 | 29,26 | 10,21 |
lug-19 | 52,31 | 12,51 | 37,66 | 10,87 |
ago-19 | 49,54 | 11,37 | 33,39 | 10,23 |
set-19 | 51,18 | 12,56 | 35,54 | 9,64 |
ott-19 | 52,82 | 12,81 | 38,60 | 10,09 |
nov-19 | 48,16 | 16,18 | 45,94 | 14,20 |
dic-19 | 43,34 | 14,66 | 36,46 | 13,12 |
gen-20 | 47,47 | 13,24 | 38,01 | 11,22 |
feb-20 | 39,30 | 10,77 | 26,25 | 9,19 |
mar-20 | 31,99 | 9,98 | 23,83 | 8,48 |
apr-20 | 24,81 | 8,62 | 13,45 | 6,47 |
mag-20 | 21,79 | 6,51 | 14,86 | 4,51 |
giu-20 | 28,01 | 5,89 | 25,79 | 4,95 |
lug-20 | 38,01 | 6,36 | 33,41 | 4,81 |
ago-20 | 40,32 | 8,17 | 36,75 | 7,24 |
set-20 | 48,80 | 11,40 | 47,20 | 10,64 |
ott-20 | 43,57 | 13,19 | 37,89 | 13,65 |
nov-20 | 48,75 | 13,84 | 40,11 | 13,56 |
dic-20 | 54,04 | 16,28 | 48,42 | 16,00 |
gen-21 | 60,71 | 19,86 | 59,48 | 20,55 |
feb-21 | 56,57 | 18,09 | 49,01 | 17,43 |
mar-21 | 60,39 | 18,22 | 50,22 | 17,34 |
apr-21 | 69,02 | 21,36 | 63,10 | 19,97 |
mag-21 | 69,91 | 25,27 | 55,28 | 24,64 |
giu-21 | 84,80 | 28,07 | 73,51 | 28,34 |
lug-21 | 102,66 | 35,32 | 78,37 | 35,75 |
ago-21 | 112,40 | 42,27 | 77,30 | 43,70 |
set-21 | 158,59 | 62,23 | 135,31 | 61,49 |
ott-21 | 217,63 | 85,39 | 172,45 | 83,87 |
nov-21 | 225,95 | 80,49 | 217,06 | 79,86 |
dic-21 | 281,24 | 113,42 | 274,67 | 113,52 |
gen-22 | 224,50 | 86,02 | 211,42 | 82,18 |
feb-22 | 211,69 | 81,45 | 185,55 | 78,78 |
mar-22 | 308,07 | 126,62 | 295,20 | 123,57 |
apr-22 | 245,97 | 100,17 | 233,10 | 88,61 |
mag-22 | 230,06 | 89,82 | 197,43 | 75,85 |
giu-22 | 271,31 | 102,67 | 248,40 | 93,27 |
lug-22 | 441,65 | 172,88 | 400,87 | 123,63 |
ago-22 | 543,15 | 233,53 | 492,49 | 157,27 |
set-22 | 429,92 | 183,41 | 394,70 | 110,65 |
ott-22 | 211,50 | 78,05 | 178,88 | 48,43 |
nov-22 | 224,51 | 91,20 | 191,88 | 69,57 |
dic-22 | 294,91 | 116,60 | 270,89 | 107,81 |
gen-23 | 174,49 | 68,37 | 132,10 | 58,15 |
feb-23 | 161,07 | 56,87 | 148,76 | 50,70 |
mar-23 | 136,38 | 46,58 | 111,96 | 44,29 |
apr-23 | 134,97 | 44,83 | 106,36 | 41,68 |
mag-23 | 105,73 | 34,07 | 77,55 | 29,90 |
giu-23 | 105,34 | 33,14 | 91,29 | 31,08 |
lug-23 | 112,09 | 31,42 | 77,65 | 29,11 |
ago-23 | 111,89 | 33,21 | 90,87 | 32,87 |
set-23 | 115,70 | 37,05 | 88,71 | 35,79 |
ott-23 | 134,26 | 43,73 | 84,26 | 41,66 |
nov-23 | 121,74 | 42,53 | 88,96 | 38,01 |
dic-23 | 114,52 | 36,31 | 68,58 | 33,01 |
gen-24 | 99,16 | 31,19 | 76,59 | 28,51 |
feb-24 | 87,63 | 27,84 | 58,37 | 24,97 |
mar-24 | 88,86 | 28,75 | 53,59 | 26,42 |
I've tried unpivoting all the columns but seems not working as well unfortunately.
Many thanks for your help.
Best Regards
Fabio
@Fabio_B This seems to work for me. See PBIX attached below signature. Just unpivot the columns and use the Attribute column as your slicer.
Thanks a lot @Greg_Deckler, we're almost there!
Now the chart is showing only one Country/Utility selected, but if i'm selecting more than one it sum the values insted of adding a new line.
Do you think it would be possible to have something like this, adding more than one instead of the sum of the values?
Again, thanks for the support.
Fabio
@Fabio_B Just put the Attribute column in the legend.
@Fabio_B Sorry, having trouble following, can you post sample data as text and expected output?
Not really enough information to go on, please first check if your issue is a common issue listed here: https://community.powerbi.com/t5/Community-Blog/Before-You-Post-Read-This/ba-p/1116882
Also, please see this post regarding How to Get Your Question Answered Quickly: https://community.powerbi.com/t5/Community-Blog/How-to-Get-Your-Question-Answered-Quickly/ba-p/38490
The most important parts are:
1. Sample data as text, use the table tool in the editing bar
2. Expected output from sample data
3. Explanation in words of how to get from 1. to 2.
March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!
Your insights matter. That’s why we created a quick survey to learn about your experience finding answers to technical questions.
Arun Ulag shares exciting details about the Microsoft Fabric Conference 2025, which will be held in Las Vegas, NV.
User | Count |
---|---|
129 | |
90 | |
75 | |
58 | |
53 |
User | Count |
---|---|
200 | |
104 | |
101 | |
67 | |
55 |