Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Enhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.

Reply
bmcminn
Helper II
Helper II

Frequency table for values in column selected by parameter

I have a parameter, with a slicer, for each column in a table. I want to make a histogram that would show the frequency for all the values in the selected column. How would I do this?

1 ACCEPTED SOLUTION
bmcminn
Helper II
Helper II

So, depending on what you need, this is actually a pretty straightforward task. I'm not sure how to create a table that exists in the model, but to make it as a visualization is no big deal. Use a count of all the rows or unique IDs or whatever and the column from the parameter. I should have tried this initially.

bmcminn_0-1691701145568.pngbmcminn_1-1691701155127.png

 

View solution in original post

5 REPLIES 5
bmcminn
Helper II
Helper II

So, depending on what you need, this is actually a pretty straightforward task. I'm not sure how to create a table that exists in the model, but to make it as a visualization is no big deal. Use a count of all the rows or unique IDs or whatever and the column from the parameter. I should have tried this initially.

bmcminn_0-1691701145568.pngbmcminn_1-1691701155127.png

 

Ritaf1983
Super User
Super User

Hi @bmcminn 

Please provide sample data that covers your issue or question completely, in a usable format (not as a screenshot).
https://community.powerbi.com/t5/Community-Blog/How-to-provide-sample-data-in-the-Power-BI-Forum/ba-...
Please show the expected outcome based on the sample data you provided.

https://community.powerbi.com/t5/Desktop/How-to-Get-Your-Question-Answered-Quickly/m-p/1447523

Regards,
Rita Fainshtein | Microsoft MVP
https://www.linkedin.com/in/rita-fainshtein/
Blog : https://www.madeiradata.com/profile/ritaf/profile

@Ritaf1983 Do you know of a way for me to upload a pbix file and demonstrate the parameter? I'm guessing that since you're a community champion you must.

bmcminn_0-1691691069588.png

---edit---
Here is a link to the pbix in google drive.
https://drive.google.com/file/d/1c6ReKmFrMUyguKDGKuPyIlAuX4h2ABWu/view?usp=sharing 


If not then the "example" would be this.

Column 1Column 2
A1
B4
C5
B6
B4



Result when Column 1 is chosen in the paramter.

ValueCount
A1
B3
C1


I was able to create a frequency table for a specific column, using:
FrequencyTable = SUMMARIZE(Table, Table[Column 1], "Count", COUNTROWS(Table)
but trying to create a dynamic table by simply switching out the table/columns names for the corresponding parameter/paramter_column names but that returns the following error:
Parameter [Parameter Column 1] is part of composite key, but not all columns of the composite key are included in the expression or its dependent expression.

The next thing I'm going to try is to use SWITCH.

Hi @bmcminn 

Yes you can save your pbix on google drive or something similiar and share it with the link.

I will look on your example tomorrow , i am not near my comuter now

Regards,
Rita Fainshtein | Microsoft MVP
https://www.linkedin.com/in/rita-fainshtein/
Blog : https://www.madeiradata.com/profile/ritaf/profile

Thank you. I posted a link.

Helpful resources

Announcements
July PBI25 Carousel

Power BI Monthly Update - July 2025

Check out the July 2025 Power BI update to learn about new features.

Join our Fabric User Panel

Join our Fabric User Panel

This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.

June 2025 community update carousel

Fabric Community Update - June 2025

Find out what's new and trending in the Fabric community.