Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Get certified in Microsoft Fabric—for free! For a limited time, get a free DP-600 exam voucher to use by the end of 2024. Register now

Reply
IanAguila
New Member

Select column to show in a graph/card

Good afternoon.

I'm quite new to PBI, then I need some help to do one thing:

 

I have a system that measures temperature and humidity and records it into a .txt file, separating columns by "tab".

But I want to make possible that the user can select the temperature unit.

I have, originally, on the .txt, a column with temperatures in Celsius, and made two other ones, where the PBI will calculate the respective values in Kelvin and Fahrenheit units.

 

I want to show it into a graph, and also show the maximum, minimum and average values in a day, but for it I want to use a combo box, where the user will select the temperature unit. 

 

And there is my problem: How can I select a column to show into something, depending on the selection of the user?

 

I'll send some prints for you to understand it better:

 

IanAguila_0-1598288707296.pngIanAguila_1-1598288782781.png

IanAguila_3-1598289174935.png

In this last print, I only want to show one of these columns, selected by the user. How can I do it?

1 ACCEPTED SOLUTION

This video also walks through it, and this is a YouTube channel (Curbal) that a lot of people starting out get a lot from.  Please see this video and the earlier ones to get started.

 

https://www.youtube.com/watch?v=gYbGNeYD4OY

 

If this works for you, please mark it as the solution.  Kudos are appreciated too.  Please let me know if not.

Regards,

Pat





Did I answer your question? Mark my post as a solution! Kudos are also appreciated!

To learn more about Power BI, follow me on Twitter or subscribe on YouTube.


@mahoneypa HoosierBI on YouTube


View solution in original post

3 REPLIES 3
mahoneypat
Microsoft Employee
Microsoft Employee

To do this, you can use the approach described in this article.

https://www.fourmoo.com/2017/11/21/power-bi-using-a-slicer-to-show-different-measures/

 

Also, you don't need to make calculated columns for Kelvin and Farenheit.  You can just have a measure for each.  For example,

Farenheit Temp = [Celsius Temp] * 9/5 + 32

 

Where [Celsius Temp] is the measure on your Celsius temp column (e.g., AVERAGE(Table[TemperaturaCelsius]).  If each data point on the chart is a single value, the aggregation won't matter (max, min, sum, average).

 

You can then have a SWITCH measure that returns the result of one of the measures (Celsius, Kelvin, Farenheit).

 

If this works for you, please mark it as the solution.  Kudos are appreciated too.  Please let me know if not.

Regards,

Pat





Did I answer your question? Mark my post as a solution! Kudos are also appreciated!

To learn more about Power BI, follow me on Twitter or subscribe on YouTube.


@mahoneypa HoosierBI on YouTube


Thank you for the incredibly quick answer. I've thought about using measures, but I really don't know how.

When I've tried it, the measure was only using average/sum values, and I don't want it. I want all the values to be plotted. I not even know how to properly create a measure.

 

The switch function I also don't know how to use.

Can you help me with it?

This video also walks through it, and this is a YouTube channel (Curbal) that a lot of people starting out get a lot from.  Please see this video and the earlier ones to get started.

 

https://www.youtube.com/watch?v=gYbGNeYD4OY

 

If this works for you, please mark it as the solution.  Kudos are appreciated too.  Please let me know if not.

Regards,

Pat





Did I answer your question? Mark my post as a solution! Kudos are also appreciated!

To learn more about Power BI, follow me on Twitter or subscribe on YouTube.


@mahoneypa HoosierBI on YouTube


Helpful resources

Announcements
November Carousel

Fabric Community Update - November 2024

Find out what's new and trending in the Fabric Community.

Live Sessions with Fabric DB

Be one of the first to start using Fabric Databases

Starting December 3, join live sessions with database experts and the Fabric product team to learn just how easy it is to get started.

Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount! Early Bird pricing ends December 9th.

Nov PBI Update Carousel

Power BI Monthly Update - November 2024

Check out the November 2024 Power BI update to learn about new features.