- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Calculate categories with measure
Hi,
I want to have three categories based on the values in the graph below.
One category : 60-30, second: 30-15 third: 15-0. A measure needs to count the amount of values that are in these categories.
But the measure needs to be adaptive so, if I have a new graph with different values, the measure needs to adapt to this and make three categories based on the values in the graph.
What measure is able to do this?
Thanks!
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi @Anonymous ,
Based on your description, categories need as axis or legend. So I created a calculated column as categories. In addition, I converted a calculated column based on your measure.
Best Regards,
Liang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi @Anonymous ,
See if this pbix can solve your problem.
Best Regards,
Liang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Thanks for taking the time to help me. If I look at it, I think it won't work in my case because I need to make these categories based on a measure I made. This is a very easy measure that summarizes the values I want.
Based on these values I want those 3 categories. But I see that the idea is there, it's how I want it.
It is possible that you change the 'Table (2)'[value] in my measure?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi @Anonymous
Could you please share a sample PBIX file and the result you expect ?(Please mask any sensitive data before uploading)
Best Regards,
Liang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
See this easy example: Page one has the sum values of the orders, which is shown by customer.
On this page you can use 'Drilltrough' (which if for some reason not working) but it can used for this example. You can drilltrough by customer and you will see the order values of this customer on page 2.
The empty graph needs to show the 3 categories of these order values.
Hope this helps!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi @Anonymous ,
Based on your description, categories need as axis or legend. So I created a calculated column as categories. In addition, I converted a calculated column based on your measure.
Best Regards,
Liang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I think if you remove the category from you table visual you will get the same results than in the card visual because you are using Sum() function. If you can share more details would be fantastic but probably you can consider using Average insted of sum. Or create a new measure to get the average.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
@Anonymous I don't have a category, I want one. Also I don't want average values, they need to stay the same.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
You could potentially do this with the Disconnected Table Trick and have categories in your disconnected table of "low", "medium", "high". This would be your axis and then you would have a measure that referenced this table and returned the correct counts. So, in general, to use a measure in that way, you need to use the Disconnected Table Trick as this article demonstrates: https://community.powerbi.com/t5/Community-Blog/Solving-Attendance-with-the-Disconnected-Table-Trick...
You might also want to check out grouping and binning.
Follow on LinkedIn
@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!: Power BI Cookbook Third Edition (Color)
DAX is easy, CALCULATE makes DAX hard...

Helpful resources
Subject | Author | Posted | |
---|---|---|---|
07-11-2024 03:26 PM | |||
08-23-2024 10:44 AM | |||
07-03-2024 01:13 AM | |||
06-25-2024 03:02 PM | |||
07-24-2024 12:31 AM |
User | Count |
---|---|
141 | |
111 | |
81 | |
61 | |
46 |