cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
philthegaps
Helper I
Helper I

Can we set a filter for a particular column in the Table visual ?

Hi everybody

My problem is the following. I have a data source/table named Fruit with say, 2 fields: name, color. Now I want a Table visual with 2 columns (and only one row):
  • The count of red fruits;
  • The count of green fruits.
It seems very simple, but I want to avoid to build calculated columns or measures - that is keep my data unchanged.

So I could insert the same field in the 2 columns: Σ(name), and filter the first column to keep only the red fruits, the second to keep only the green fruit. I don't need the filters to be visible (with little triangles) like in Excel, since the users don't have to interact.

I have the feeling that this is possible in Power Query, but not in Power BI.

Any idea is welcome
7 REPLIES 7
v-chenwuz-msft
Community Support
Community Support

Hi @philthegaps ,

 

You can try piovt column.

Pivot columns - Power Query | Microsoft Docs

 

Best Regards

Community Support Team _ chenwu zhu

 

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

 

Hi Chen Wu

 

Could you elaborate ? I canot see the purpose.

Hi @philthegaps ,

 

My original data table is the following table.

vchenwuzmsft_0-1642582556668.png

Select the colour column, then select the pivot column, in the message box, select Fruits for the Values column and "count all" for the advanced options.

vchenwuzmsft_1-1642582896257.png

Then you will get the result:

vchenwuzmsft_2-1642582936429.png

At this point, you get a colour-based count.

If I have misunderstood you, you can share the pbix file that wipes out sensitive information and the expected results.

 

Best Regards

Community Support Team _ chenwu zhu

 

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

 

 

 

Yes I think you misunderstood me. I don't want a solution with M or DAX, but a "direct" solution with the Table/Matrix visual. 
But I think there is no alternative so far, I have to use Dax or M.

parry2k
Super User
Super User

@philthegaps so what? It doesn't hurt.

 

Anyhow as I mentioned previously if you don't want new measures then you have to pre-aggregate in Power Query.

 

 

Follow us on LinkedIn and YouTube.gif to our YouTube channel

 

Learn about conditional formatting at Microsoft Reactor

My latest blog post The Power of Using Calculation Groups with Inactive Relationships (Part 1) (perytus.com) I would  Kudos if my solution helped. 👉 If you can spend time posting the question, you can also make efforts to give Kudos to whoever helped to solve your problem. It is a token of appreciation!

 

Visit us at https://perytus.com, your one-stop-shop for Power BI-related projects/training/consultancy.






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.





parry2k
Super User
Super User

@philthegaps not sure why you want to do this and what is the rational behind this. If you don't want to create a column or measure (you should write measure), in this case, you need to pre-aggregate in Power Query and then just visualize it.

 

 

Follow us on LinkedIn and YouTube.gif to our YouTube channel

 

Learn about conditional formatting at Microsoft Reactor

My latest blog post The Power of Using Calculation Groups with Inactive Relationships (Part 1) (perytus.com) I would  Kudos if my solution helped. 👉 If you can spend time posting the question, you can also make efforts to give Kudos to whoever helped to solve your problem. It is a token of appreciation!

 

Visit us at https://perytus.com, your one-stop-shop for Power BI-related projects/training/consultancy.






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.





Thanks for your quick answer parry2k
The rationale is to avoid having too much measures (I have more than a hundred). 

Helpful resources

Announcements
November 2022 Update

Check it Out!

Click here to read more about the November 2022 updates!

Microsoft 365 Conference â__ December 6-8, 2022

Microsoft 365 Conference - 06-08 December

Join us in Las Vegas to experience community, incredible learning opportunities, and connections that will help grow skills, know-how, and more.

Power BI Dev Camp Session 27

Ted's Dev Camp

This session walks through creating a new Azure AD B2C tenant and configuring it with user flows and custom policies.