Power BI is turning 10, and we’re marking the occasion with a special community challenge. Use your creativity to tell a story, uncover trends, or highlight something unexpected.
Get startedJoin us for an expert-led overview of the tools and concepts you'll need to become a Certified Power BI Data Analyst and pass exam PL-300. Register now.
Hey I have a small sample table example below this. When I am creating visualizations, specifically the stacked column chart, I use a slicer to seperate and count distinct values by year. So If I choose 2012, my visualization should show id 1 = 1 in sales year 2012 and id 2 = 1 in Sales year 2012. Instead it is showing up as id 1 = 3 and id 2 = 1. My understanding is that if it sees atleast one id in 2012 it counts all instances of it within in the table. Does anyone know how to change this?
id | salesYear|
--------------------|
1 | 2012 |
1 | 2013 |
2 | 2012 |
1 | 2015 |
Solved! Go to Solution.
Hi @kpansia,
I reproduce your scenario and get expected result, please follow the steps below.
1. Create a measure using the formula below.
DistinctCount = COUNT(Table2[id])
2. Create a stacked column chart, select the Id as x-axis, the measure as value. Create a slicer including Year field.select 2012 year
select 2013 year
Please download the .pbix for reviewing more details.
Best Regards,
Angelia
Hi @kpansia,
I reproduce your scenario and get expected result, please follow the steps below.
1. Create a measure using the formula below.
DistinctCount = COUNT(Table2[id])
2. Create a stacked column chart, select the Id as x-axis, the measure as value. Create a slicer including Year field.select 2012 year
select 2013 year
Please download the .pbix for reviewing more details.
Best Regards,
Angelia
This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.
Check out the June 2025 Power BI update to learn about new features.
User | Count |
---|---|
66 | |
54 | |
47 | |
36 | |
34 |
User | Count |
---|---|
84 | |
70 | |
58 | |
45 | |
44 |