Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.
Hi,
I don't know if this could be done with PowerBI or not.
when I try to create a graph like a line graph :
I always set the graph values from PBI UI :
what I want to do is not to do these values set by this UI, but I want to set the values dynamically from power query or measure maybe.
my question would be :
1. is it possible to do this in PowerBI?either by using measure or power query
2. if it's possible is there any tutorial or any documents that I could read to learn about this more?
bests,
Solved! Go to Solution.
If you unpivot your data such that there is one row per sensor with a column that has the sensor name. You can put the sensor value in the values of the visual and sensor name column in the legend.
Hi,
So I tried unpivoted my data just like you suggested.
and it worked after I add some more tweak.
for references:
1. I import my original data without unpivot it
2. I create another power query and this time I add unpivot process and get my unpivoted data
3. after I create both of these tables, I connected both of their models and set the connection into both ways.
4. then I mapped my unpivoted data into my graph,
with this, my graph could add and remove its values dynamically.
thank you
If you unpivot your data such that there is one row per sensor with a column that has the sensor name. You can put the sensor value in the values of the visual and sensor name column in the legend.
Hi Artemis,
thank you for your reply.
when you said unpivot my data, does it means to change my data from:
time | sensor1 | sensor2 |
100 | 0 | 1 |
200 | 1 | 2 |
to this?
col1 | col2 | col3 |
time | 100 | 200 |
sensor1 | 0 | 1 |
if yes, I think I could do it, but still I don't understand how to map these data without me selecting it manually from PowerBI UI. s
I mean your data should look like:
time | sensor name | sensor value |
100 | sensor1 | 0 |
100 | sensor2 | 1 |
200 | sensor1 | 1 |
200 | sensor2 | 2 |
Then put "sensor name" into legend and "sensor value" into values
Hi,
So I tried unpivoted my data just like you suggested.
and it worked after I add some more tweak.
for references:
1. I import my original data without unpivot it
2. I create another power query and this time I add unpivot process and get my unpivoted data
3. after I create both of these tables, I connected both of their models and set the connection into both ways.
4. then I mapped my unpivoted data into my graph,
with this, my graph could add and remove its values dynamically.
thank you