Qliksense ::calculated dimension - qliksense

I created a table column with percentage values using a formula in expression editor in qliksense.
Now, I want to plot a bar graph with 4 bars each bar corresponding to count of range of percentage values ( ex, -100% to 0% ; 05 to 25% ; 25% to 50 % ; 505 to 100% ) from the column I created. How to do this?

Usually for buckets you use class function:
https://help.qlik.com/en-US/sense/November2018/Subsystems/Hub/Content/Sense_Hub/Scripting/ConditionalFunctions/class.htm
You can add exact original visualization, expression, data model or even qvf so I can answer with more details/solution.

Related

How to divide values from the same dimension in Tableau?

I am trying to divide values from the same pill in Tableau. Per my screenshot, the pill is named "Animals" & the grouped values within that pill are dog, cat, hamster & horse.
How can I divide dog by cat? How can I divide hamster by horse? How I divide cat by hamster? etc.
How would I create a calculation to show the desired values?
Without the option of pivoting rows to columns available in Tableau Desktop, you have to manually create each of the desired ratio calculated field.
I have created a sample data by sampling 200 rows in a Programming language
Your created view is like this
Now create a calculated field for each of the desired ratio. say cat/dog like this
ZN(SUM(IF [Animals] = "cat" then 1 else 0 END))/
ZN(SUM(IF [Animals] = "dog" then 1 else 0 END))
Better use this field as discreet
Add this field to view you'll get desired ratios

Chart showing amount of numbers in dataset in Google Sheets

I have a set of 500 numbers (range A1:T25) from 1-200 that I need to put in a pie chart showing the popularity of each number from 1-200. When I try to select all of the cells and put them in a pie chart, I can see multiple slices for each number. I even tried putting the cells into a single column.
=QUERY(QUERY(ARRAYFORMULA(TRANSPOSE(SPLIT(JOIN(" ",
QUERY(A1:T25, , 10000)), " "))),
"select Col1,count(Col1) group by Col1 label count(Col1)''"),
"order by Col2 desc")
I hope your data is not uniformly distributed—pie charts with 200 slices can be hideous!
If I'm understanding your goal correctly, you don't actually want a chart of those 500 numbers, you want a chart of how often each value appears in that set. Generate a report of that data in pairs, and chart that.
For example in a cell with 200 empty cells below it, say A30 or V1, enter:
=ARRAYFORMULA(ROW(1:200))
These are your possible values, 1 to 200.
Then next to it in say, B30 or W1, enter:
=ARRAYFORMULA(COUNTIF($A$1:$T$25, "="&ROW(1:200)))
These are individual counts of how often each A column number appears in A1:T25.
Now that your values and their 'popularity' counted out, create your pie chart from that.

Tableau calculate percentage from a value in the table

I'm trying to calculate the percentage in Tableau from a value in a table.
For example. I have a table that contains the following
Name Value
a 10
b 20
c 30
Ref 100
How can I have the percentages calculated based on the Ref value like for example a/Ref
Name Value Percentage (x/Ref)
a 10 10%
b 20 20%
c 30 30%
Thanks
You can either
use tableaus built in functionality:
Right click the measure pill and select "quick table calculation -> Percentage of total"
2.Use calculated fields.
Create a calculated field(Analysis->Create Calculated Field) called reference. As the value enter the integer you want.
Create a second calculated field call it percentage. Here enter the mathematical formula to get a percentage using the reference calculated field as your total.
So something like:
[Value] / [refrence] *100
You don't need the reference calc field, you could just hard code the value into the calculation.
Drag the percentage calculated field into the row shelf.

Tableau: Plot percentage of binary column

Simplified example: column of 'measure' data is binary 0's and 1's. The sum of the column (all the 1's summed) is 3948. The length of the column is 4567. 3948 is 86% of 4567. How do I create a bar chart showing this percentage. All I can get is a bar adding up to 100%.
I've tried absolutely everything in the percentage of dropdown, calculated fields, online tutorials, etc.
Two approaches:
Right click on your measure field on whichever shelf you placed it. Choose Quick Table Calc -> Percentage of Total. Experiment with different settings for "Compute Using" and read about addressing and partitioning of table calculations to learn how to specify percent of "what".
Or create a calculated field specific to your problem defined as below:
sum(int([my measure field] = 1)) / count(1)
Be sure to set the default number format for your calculated field to a percentage, by right clicking on it in the data pane (left margin) and revising the default properties
Note, the second calculation works because the INT() function converts True to 1 and False to 0, which is useful in several contexts.
You can go about this using the following method
Add 'measure' to Columns and make it a Discrete Dimension
Add SUM(Number of Records) to Rows. This should give you the bar chart you need.
This would help achieve what you are looking to do. For more customization and a better look for the graph you are looking to build in Tableau.
Add 'measure' to the colour legend and make it a Discrete Dimension.
Add SUM(Number of Records) as a Label and do a '% of Total' quick table calculation.

Compare big gapped data columns in chart

I have these related columns:
col1 data range 1500 - 3000
col2 data range 27 - 50
col3 data range 0 - 30
I want to show the relation between those columns in a chart. But as col1 is so far apart from the other I just see the line of col1 and the other two are barely more than a straight line at the bottom of the chart.
How can I drag them up so the values are correct but I can still see the correlation between all columns?
What I would actually need are three charts that overlay each other.
I did not find any option for this in LibreOffice Calc 3.5.4.2
There are different ways to handle differently-scaled data when creating a chart. The easiest way is to "scale" the raw data; e.g., to divide every value in col1 by 1000 and use the result as source data for the chart.
If modifying the source data is no option, you could use different scales for col1 on the one hand, col2/3 on the other. Starting with the following dummy data:
If you've selected the data series for column C, you could align the chart columns to the secondary Y axis, while columns A/B keep aligned to the primary Y axis.
LO will adapt the scale of the secondary Y axis automatically by default:
Another option would be combining a default primary Y axis with a logarithmic-scaled secondary X axis...
... resulting in:
But generally, i would refrain from combining a "normal" primary X axis with a logarithmic secondary Y scale, since such a chart will be very hard to interpret.
In any case, i would recommend to enable data labels to display the values together with the columns.
PS: All charts created with LO 4.2.3.3