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

Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.

Reply
eugenm
Helper II
Helper II

Double grouping in visuals (no Power Query)

Hi there, how would one solve this sort of problem?
I want to have a filtered visual for the following:

DATA

ClownsBallsColor
ClownA1Red
ClownB2Blue
ClownC3Green
ClownD4Green
ClownE4Yellow
ClownF4Red
ClownG2Red
ClownH2Blue
ClownI1Red
   
   
REPORT & VISUAL  
Desired output (available filter: Color)
   
# of Clowns with 1 Ball2 
# of Clowns with 2 Balls3 
# of Clowns with 3 Balls1 
# of Clowns with 4 Balls3 

 

Not sure how you'd call this sort of "binning", but this is the desired logic.

I want to be able to tell how many clowns are in each category, with the data being filterable by color.
In other words, when applying a red color filter, the output will indicate the # of clowns with red balls, within each category.

 

Ideally, I want to achieve this without the use of a power query, as I am dealing with a massive amount of data and several other calculation, as well as remote data... 
No matter what, it must be possible to plot a graph that plots the result as per the output table above, impacted by a color filter.

Thanks in advance,

Eugen

2 ACCEPTED SOLUTIONS
Ashish_Mathur
Super User
Super User

Hi,

PBI file attached.

Hope this helps.

Ashish_Mathur_0-1714792795154.png

 


Regards,
Ashish Mathur
http://www.ashishmathur.com
https://www.linkedin.com/in/excelenthusiasts/

View solution in original post

My solution will not be affected by an additoinal Date column in Table1.


Regards,
Ashish Mathur
http://www.ashishmathur.com
https://www.linkedin.com/in/excelenthusiasts/

View solution in original post

17 REPLIES 17
eugenm
Helper II
Helper II

So, the idea is that the clowns get their balls in batches, at different times, not all at once.

eugenm
Helper II
Helper II

Ah, never mind, that's over complicating it.
I'm sure that I won't need to make that upper limit dynamic after all.

Thanks again. This works.

Ashish_Mathur
Super User
Super User

Hi,

PBI file attached.

Hope this helps.

Ashish_Mathur_0-1714792795154.png

 


Regards,
Ashish Mathur
http://www.ashishmathur.com
https://www.linkedin.com/in/excelenthusiasts/

Thank you very much. 
Almost there, but how can this be done if the # of categories has to be dynamic and potentially much higher (in the tens)? Obviously that would not be colors, as in this example. Let's say that it's numbered balls... But at the beginning we don't know what's the max # of categories that we will have at the beginning of the calculation.
Thoughts? In reality, in my real life case it looks like I will have 14 categories, but I'd like to know how to handle this if that changes a lot, as it looks like it may.

Thank you

You are welcome.


Regards,
Ashish Mathur
http://www.ashishmathur.com
https://www.linkedin.com/in/excelenthusiasts/

If you don't mind, may I add another angle, which is actually a direct reflection of my data. I know how to do this the harder way, but I feel like your formula can be adjusted to include this sort of situation as well.

The idea here is that the clowns get their balls every now and then (earn them in a contest lol).
How can your formula be adjusted to account for this data distribution?
Date         Clowns    Balls       Color

01-May-24ClownA1Red
02-May-24ClownB1Blue
02-May-24ClownB1Blue
01-May-24ClownC1Green
03-May-24ClownC2Red
02-May-24ClownD2Green
06-May-24ClownD1Yellow
06-May-24ClownD2Blue
01-May-24ClownE4Yellow
04-May-24ClownF4Red
03-May-24ClownG2Red
05-May-24ClownH1Blue
04-May-24ClownH1Yellow
03-May-24ClownI1Red

 

Thank you kindly,

Eugen

Neither have i understood your question nor do i know the expected result you want.  Therefore, even if i want to, i cannot help.  Show the expected result in a Table format very clearly with a proper explanation.


Regards,
Ashish Mathur
http://www.ashishmathur.com
https://www.linkedin.com/in/excelenthusiasts/

Certainly. You're right.
Here's the full scoop:

Data

DateClownsBallsColor
01-May-24ClownA1Red
02-May-24ClownB1

Blue

02-May-24ClownB1Blue
01-May-24ClownC1Green
03-May-24ClownC2Red
02-May-24ClownD2Green
06-May-24ClownD1Yellow
06-May-24ClownD2Blue
01-May-24ClownE4Yellow
04-May-24ClownF4Red
03-May-24ClownG2Red
05-May-24ClownH1Blue
04-May-24ClownH1Yellow
03-May-24ClownI1

 

 

Intermediate Calculation/ View
(it shows the ball totals that each clown has, irrespective of ball color)

ClownTotal Balls
ClownA1
ClownB2
ClownC3
ClownD5
ClownE4
ClownF4
ClownG2
ClownH2
ClownI1

 

DESIRED OUTPUT
(The Category Based Report)

CategoryClowns by Category
1 ball2
2 balls3
3 balls1
4 balls2
5 balls1

 

I hope that clear the use case and the desired outcome.

Thanks again.

My solution will work here.  What problem are you facing with my solution?


Regards,
Ashish Mathur
http://www.ashishmathur.com
https://www.linkedin.com/in/excelenthusiasts/

Is it possible to do the sum of balls from the various dates, for each clown, within the same formulas that you've used, or do I have to do that summing up, per clown , to get their ball total - separately?

I am confused.  In the desired outcome section of your previous message, there is no mention of Date anywhere.  What results do you get with my solution?  Are those results wrong?  What result do you want to see?


Regards,
Ashish Mathur
http://www.ashishmathur.com
https://www.linkedin.com/in/excelenthusiasts/

Your solution covers the processing from the intermediate view to the end result (the last two tables). The actual input data though comes broken down by dates of when the clowns get the balls. 
There is no date in the results and it's not required.
But the number of balls per clown is not known from the beginning. It has to be gathered from the first data input, that shows when they've got the balls. 
It's not important when they've got the balls, but how many they got.
But the how many comes by adding the balls received during the respective dates, gradually. 

I really hope that this clarifies it better.

My solution will not be affected by an additoinal Date column in Table1.


Regards,
Ashish Mathur
http://www.ashishmathur.com
https://www.linkedin.com/in/excelenthusiasts/

Hang on, I guess that it may work. I haven't tried it with the first table as input.
It may not matter that you have the data ,sorry. I now see what you mean.

Let me double check. 

Indeed, upon double checking the formulas, I agree that it shouldn't make a difference.

There still is one issue. In the new data, I have a total of 5 balls for one of the clowns. 
It does not come out in the result (more than 4 balls = 0, instead of 1).

Nevermind. Fixed. It was a copy and paste error, as I duplicated a table when creating the new data source. 
It's all good. Thank you so much. It works with this new data as well. 

 

Should work absolutely fine.  If it is working fine for the other categories, there is no reason for it to fail for 1.  Check thorughly.

DIY.


Regards,
Ashish Mathur
http://www.ashishmathur.com
https://www.linkedin.com/in/excelenthusiasts/

Helpful resources

Announcements
LearnSurvey

Fabric certifications survey

Certification feedback opportunity for the community.

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

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