Forum Discussion
How to group data
- 9 years ago
Hi ohohbudi,
>>I want to create a pie chart divided into 2 categories : '0%' and 'Not 0% Discount'. Then, if I click the the pie chart on 'Not 0% Discount', there will be a table that will show all the discounts percentage > 0% list (1%, 3%, 5%, 7%, etc)For your requriement, I try to reproduce and get expected result.
I create sample table.
I create a calculated column to get percentage ([Diskon Product]/[Total Product]). Then use IF...ELSE function to judge if the percentage is 0.Percentage = Table2[Diskon]/CALCULATE(SUM(Table2[Diskon]),ALL(Table2))
Tag = IF(Table2[Percentage]=0,"0%","Not 0% Discount")
Create a Pie Chart and Table visual. Please view the following screenshot. The green part show the count of 0 percents, and the back part shows the not 0 percents.
When you click the 0%, it will list the 0 %. Otherwise, it will returns other results.
Please let me know if you have any issue.
Best Regards,
Angelia
Hi ohohbudi,
>>I want to create a pie chart divided into 2 categories : '0%' and 'Not 0% Discount'. Then, if I click the the pie chart on 'Not 0% Discount', there will be a table that will show all the discounts percentage > 0% list (1%, 3%, 5%, 7%, etc)
For your requriement, I try to reproduce and get expected result.
I create sample table.
I create a calculated column to get percentage ([Diskon Product]/[Total Product]). Then use IF...ELSE function to judge if the percentage is 0.
Percentage = Table2[Diskon]/CALCULATE(SUM(Table2[Diskon]),ALL(Table2))
Tag = IF(Table2[Percentage]=0,"0%","Not 0% Discount")
Create a Pie Chart and Table visual. Please view the following screenshot. The green part show the count of 0 percents, and the back part shows the not 0 percents.
When you click the 0%, it will list the 0 %. Otherwise, it will returns other results.
Please let me know if you have any issue.
Best Regards,
Angelia