Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.
I have a column in a CSV-file with about 60 e-mail addresses of which maybe 45 are valid addresses, five have the value NULL and the rest are empty rows. I want to display the column as a pie chart in the following way: one slice for the valid addresses, one slice for the NULL ones and another slice for the empty rows. Is this possible and if so, how would I go about doing it? Or do I always need two columns for a pie chart? Sorry if this is a bad question, I'm new to Power BI.
Solved! Go to Solution.
In this case, we can create another custom field using DAX and use that as legend. here is the sample:
Sample Data:
Output:
DAX Formula for new field:
EmailGroup = if(Table1[Email]=BLANK(),"Blank Email", if(Table1[Email]="NULL", "Email is Null", if(IFERROR(SEARCH("@",Table1[Email]),-1)=-1,"InValid Email", "Valid Email")))
We can always change that formula on business need, it is just an example.
Subscribe to the @PowerBIHowTo YT channel for an upcoming video on List and Record functions in Power Query!!
Learn Power BI and Fabric - subscribe to our YT channel - Click here: @PowerBIHowTo
If my solution proved useful, I'd be delighted to receive Kudos. When you put effort into asking a question, it's equally thoughtful to acknowledge and give Kudos to the individual who helped you solve the problem. It's a small gesture that shows appreciation and encouragement! ❤
Did I answer your question? Mark my post as a solution. Proud to be a Super User! Appreciate your Kudos 🙂
Feel free to email me with any of your BI needs.
In this case, we can create another custom field using DAX and use that as legend. here is the sample:
Sample Data:
Output:
DAX Formula for new field:
EmailGroup = if(Table1[Email]=BLANK(),"Blank Email", if(Table1[Email]="NULL", "Email is Null", if(IFERROR(SEARCH("@",Table1[Email]),-1)=-1,"InValid Email", "Valid Email")))
We can always change that formula on business need, it is just an example.
Subscribe to the @PowerBIHowTo YT channel for an upcoming video on List and Record functions in Power Query!!
Learn Power BI and Fabric - subscribe to our YT channel - Click here: @PowerBIHowTo
If my solution proved useful, I'd be delighted to receive Kudos. When you put effort into asking a question, it's equally thoughtful to acknowledge and give Kudos to the individual who helped you solve the problem. It's a small gesture that shows appreciation and encouragement! ❤
Did I answer your question? Mark my post as a solution. Proud to be a Super User! Appreciate your Kudos 🙂
Feel free to email me with any of your BI needs.
Fantastic! This did the trick, thank you very much for taking the time to write everything in such detail . I had a little bit of trouble with the value separators (you used comma, but apparently due to localization I needed to use semicolon instead), but it works.
Thanks for the feedback and good to know it is working for you.
Subscribe to the @PowerBIHowTo YT channel for an upcoming video on List and Record functions in Power Query!!
Learn Power BI and Fabric - subscribe to our YT channel - Click here: @PowerBIHowTo
If my solution proved useful, I'd be delighted to receive Kudos. When you put effort into asking a question, it's equally thoughtful to acknowledge and give Kudos to the individual who helped you solve the problem. It's a small gesture that shows appreciation and encouragement! ❤
Did I answer your question? Mark my post as a solution. Proud to be a Super User! Appreciate your Kudos 🙂
Feel free to email me with any of your BI needs.
In this case you need two columns. In the second column you need to solve if the value is valid, so create calculated column and define condition when the value is valid (for example when text of value contains "@" then Valid, when value equals NULL then NULL, when empty then Empty etc.). Than you use count of first column as Values in visual, and second column as Legend.
Regards.
Pavel
Or you can use "New group" function on column which is in the Legend area in visual and create manually different groups for values. Butit is quite a lot of work, when you have large dataset.
Regards.
Pavel
User | Count |
---|---|
102 | |
91 | |
87 | |
79 | |
71 |
User | Count |
---|---|
113 | |
105 | |
101 | |
75 | |
64 |