The ultimate Fabric, Power BI, SQL, and AI community-led learning event. Save €200 with code FABCOMM.
Get registeredEnhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.
Hello,
I am new to Power BI. I have a table (Contact) that has 278 rows with blank AccountIDs for some contacts.
I wanted to create a "Clustered Column Chart / Pie chart" showing "Contacts without AccountID vis-à-vis". I learnt to create a "Custom Column" and add appropriate values with this simple logic using DAX (
and create a graph based on the new column
How can I achieve the same results with the graph's filter? I don't want to create any additional column or DAX logic for the data that I already have( I can see blank vs non-blank accountID). I want to use the "Filter" in the "Clustered Column Chart" and incorporate "If Logic" in the filter. I can't seem to do it. I just can't seem to get a good grasp over these filters for all those visualizations objects. I want to learn/know how can I manipulate filters to add if logic so that I can show the same results as above without adding new columns?
Any help would be much appreciated.
Thanks
Solved! Go to Solution.
Hi @moloyus ,
If so, it is suggested to copy the AccountID column as a calculated column and then use the filter pane like so:
1. Create a calculated column to copy the AccountID column.
AccountID - Copied = [AccountID]
2. Put the AccountID column and AccountID - Copied column into Values field of the Clustered column chart. and right click them to change the name to "AccountID - Blank", "AccountID - Not Blank".
3. Go to "Filters on this visual" and filter the vlaues as "Blank" or others.
Best Regards,
Icey
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Thanks and much appreciated for your quick reply. Just have one quick question though, are you saying that the "Filter Pane" of "Clustered column chart" can't help me doing the "Group BY" based on "AccountID=Blank " and(or) "AccountID Not Blank"?
Issues with my users are they are non-technical. It is easier for them to use "Filter Pane of visualization " as drag-drop activities. They will not go for DAX (or any code-related complexities). If I can't hand them over to do their own reports, it defeats the purpose for us to use Power BI.
But I must acknowledge and thank you for your quick response.
Hi @moloyus ,
If so, it is suggested to copy the AccountID column as a calculated column and then use the filter pane like so:
1. Create a calculated column to copy the AccountID column.
AccountID - Copied = [AccountID]
2. Put the AccountID column and AccountID - Copied column into Values field of the Clustered column chart. and right click them to change the name to "AccountID - Blank", "AccountID - Not Blank".
3. Go to "Filters on this visual" and filter the vlaues as "Blank" or others.
Best Regards,
Icey
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Thanks, Icey. Much appreciated. Worked like a charm.
@moloyus , Based on what I got.
You can two-measure if you do not want the additional column. that you use in bar and pie. without a column grouping will not happen
No_Account_ID = countrows(filter(Table, Table[AccountID] ="")) //or isblank(Table[AccountID])
Contact_Has_AccountID = countrows(filter(Table, Table[AccountID] <> ""))