cancel
Showing results for 
Search instead for 
Did you mean: 

Boolean Values in Dashboard - Rename values

Carlene_Subrame
Star Contributor
Star Contributor

Hi,

I'm creating a dashboard for my users, and want to create a pie for my WorkView items. I have created my data source via SQL query, but when I create a pie based on a boolean value, I only get values of 1 and 0. I would like them to say "Yes" or "No", or even "True" or "False" is fine, but I can't find a way to rename these. Please let me know if I'm missing something.


Also, is there a way to get a constraint: for example, I only want the "Variance True/False" on the Doohickey with Attribute Q: X Value, not X Y and Z possible Values?


Thanks,

Carlene

1 ACCEPTED ANSWER

William_Pawul1
Star Contributor
Star Contributor

Hi Carlene!

Thanks for using Community!

If you need to convert a boolean value to something more user friendly, you would need to use a Calculated Field,  You can use the expression: ToBoolean([YourColumnName]) to automatically convert the 1's & 0's to True/False.  You can also refer to the Reporting Dashboards MRG on help creating Calculated Fields.


I hope this helps!

View answer in original post

4 REPLIES 4

William_Pawul1
Star Contributor
Star Contributor

Hi Carlene!

Thanks for using Community!

If you need to convert a boolean value to something more user friendly, you would need to use a Calculated Field,  You can use the expression: ToBoolean([YourColumnName]) to automatically convert the 1's & 0's to True/False.  You can also refer to the Reporting Dashboards MRG on help creating Calculated Fields.


I hope this helps!

Mike_Walkuski
Employee
Employee

Hi Carlene,


I am not too sure I follow your second question, but wanted to provide an additional option for your first question.


I like Will's answer, it is especially helpful if you have something else that you may need the 1s/0s for.


I also wanted to provide another option in the event that it fits your business case better.


You can use SQL to handle converting the 1/0 to TRUE/FALSE through the use of a CASE statement.


In my example below you can see that I am checking if the value is 1 and if so make it TRUE otherwise make it FALSE. If you use this Query in your Data Provider then you will not need to make any additional changes in the Dashboard itself.



Carlene_Subrame
Star Contributor
Star Contributor

Hi Will and Mike,

Thanks for the suggestions. I'll try the calculated fields first; it's less intimidating than the SQL in a customer environment. Also, to clarify my second question, I was trying to figure out "hidden constraints" but have tested out the Hidden Data Items/Filters to get those to work for me. The only thing I haven't figured out about it is how to constrain items to the current month or last 45 days (can I have that on a slider somewhere?)


Thanks for the quick response!

William_Pawul1
Star Contributor
Star Contributor

Hi Carlene,


There are multiple ways to display data by a date range.  The first would be using a date range parameter in your SQL, then the user would be able to choose the date range when they opened the dashboard.  The second would be by using a range filter dashboard item in the dashboard itself.  You can find more information on configuring parameters, and the different dashboard items in the Reporting Dashboards MRG.