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

Be one of the first to start using Fabric Databases. View on-demand sessions with database experts and the Microsoft product team to learn just how easy it is to get started. Watch now

Reply
Anonymous
Not applicable

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. 

Knipsel.PNG

 

 

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!

 

 

1 ACCEPTED SOLUTION

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.

test_03_10_1.PNG

Here is the pbix.

 

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

View solution in original post

8 REPLIES 8
V-lianl-msft
Community Support
Community Support

Hi @Anonymous ,

 

See if this pbix can solve your problem.

test_Dynamic quartile.PNG

 

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

Anonymous
Not applicable

@V-lianl-msft 

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?

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.

Anonymous
Not applicable

@V-lianl-msft 

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!

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.

test_03_10_1.PNG

Here is the pbix.

 

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

Anonymous
Not applicable

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.

Anonymous
Not applicable

@Anonymous I don't have a category, I want one. Also I don't want average values, they need to stay the same.

Greg_Deckler
Super User
Super User

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

Announcements
Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!

ArunFabCon

Microsoft Fabric Community Conference 2025

Arun Ulag shares exciting details about the Microsoft Fabric Conference 2025, which will be held in Las Vegas, NV.

December 2024

A Year in Review - December 2024

Find out what content was popular in the Fabric community during 2024.