Power BI is turning 10! Tune in for a special live episode on July 24 with behind-the-scenes stories, product evolution highlights, and a sneak peek at what’s in store for the future.
Save the dateJoin 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 think I am having a brain fart, but I can't make my calculate measure work.
I am trying calculate an expression over a table, but I want to include only unique rows. So I use a calculate measure with a distinct or values filter. But this doesn't seem to work and I do not understand why.
Here is a sample table I have
Event | Value |
1 | 0 |
2 | 3 |
2 | 3 |
I am trying to calculate average of [Value], but to use only unique [Event] rows. So average here would be 1,5. As Event 1 Value = 0 and Event 2 Value = 3. Average = 0+3/2=1,5
So I wrote this measure. Average =
Solved! Go to Solution.
@arca123 You should modify your measure as:
@arca123 You should modify your measure as:
Hi @devesh_gupta thank you, this works! Can you please help me understand or guide me towards resources where your solution is explored in more depth? I do not really understand why my intended solution did not work and I do not understand why Summarize function was needed to be used?
@arca123 Actually summarize takes a table and certain GroupBy columns and returns a table of distinct values, so in the expression of Averagex I've taken summarize to get distinct combination from both the columns, then it will calculate the desired average.
This idea is taken from this tutorial at given timestamp: https://youtu.be/cN8AO3_vmlY?t=27340
Thank You.
Check out the July 2025 Power BI update to learn about new features.
This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.
User | Count |
---|---|
63 | |
59 | |
56 | |
38 | |
29 |
User | Count |
---|---|
82 | |
62 | |
45 | |
41 | |
40 |