Advance your Data & AI career with 50 days of live learning, dataviz contests, hands-on challenges, study groups & certifications and more!
Get registeredGet Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now
Hi everyone
i have to create a pie with 'S' column ,that pie chart should ivide into 3 types based on 'P' column in the same table,Now i need to filter the Stock value in pie chart as L as one colour C as one cololur,remaining as one colour in percentage
Thanks in advance,
Best wishes
Aryan
Hi @aryan,
Based on my understanding, you would like to divide P column to three type, L, C and other colors which are not equal to L or C, then calculate their percentage of grand total, right?
You can create a calculated column,
Type = IF('Table4'[P]<>"L" && 'Table4'[P]<>"C","other",'Table4'[P])
Then grad this column to pie chart visual Legend bucket, column S to Values bucket.
Best Regards,
Qiuyun Yu
Thank you for the reply i am seeing an error in the formula
Hi @aryan,
It looks like the [Stock Value] data type is Number. You need to format [Stock Value] as string then compare them with text "MSC024" and "MSC025":
Type=If(FORMAT('Filtered'[Stock Value],"General Number")<>"MSC024" && FORMAT('Filtered'[Stock Value],"General Number")<>"MSC025","other",'Filtered'[Stock Value])
Reference:
https://msdn.microsoft.com/en-us/query-bi/dax/format-function-dax
Best Regards,
Qiuyun Yu
I have tried that but it is showing error as expressions that yeild variant data type can't be used to define calculated column
After changing the data type of stock value to text the output is not as desired
Hi @aryan,
Please share pbix file and points out where the issue is.
Best Regards,
Qiuyun Yu
Check out the November 2025 Power BI update to learn about new features.
Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!