简体   繁体   中英

Count and Percentage of an aggregated field in tableau

i am new to tableau, i have created a calculated field (as below) based on which I want the find the percentage.

If [x] = > 10 Then "A" 
elseif [x] < 10 Then "B" 
elseif [x] < 5 Then "C" 
END

I now need to know the percentage of A, B, & C, is this possible?

  1. The calculation (call it 'Letter') needs to be as follows to avoid the current ambiguity between B and C (also use <= not =>)

    IF [X] < 5 Then "C" ELSEIF [X] < 10 Then "B" ELSEIF [X] >= 10 Then "A" END

  2. Add letter to the rows shelf

  3. Add x to the text mark and change it from sum to count by right clicking the pill

  4. In the analysis menu, select Percentage of then Column

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM