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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
Chitemerere
Responsive Resident
Responsive Resident

Grouping in Power BI

I have a called QualityFacts:

 

I have the following measure:

Screenshot 2020-06-02 at 10.23.00.png

which gives the following results put in a card:

Screenshot 2020-06-02 at 10.28.39.png

 

I need to group the values in columns "Assay API 1", "Assay API 2" and "Assay API 3".  Assay API 1 does not have any blank values as this is a mandatory field value but Assay API 2 and Assay API 3 can be blank depending on the product/record.  I have created the following grouping table called "Assay Group" which has no relationship to the QualityFacts table, i.e. a supporting or secondary table:

Screenshot 2020-06-02 at 10.25.17.png

 

The sort order column is used for sorting the "Assay Group" column which is text.  What i want to do is group the "Assay API 1", "Assay API 2" and "Assay API 3" from the "QualityFacts" table based on the "Assay Group" table above.  I am using the following measure for "Assay API 1":

Screenshot 2020-06-02 at 10.20.35.png

However the results i am getting are not what i am expecting for "Assay API 1" where i am getting the following:

Screenshot 2020-06-02 at 10.21.55.png

 As shown in the card above, the total number of samples is 126 so i expect the grouping above to give this total.  Please assist with the right measure.

 

How would i extend the recommended measure to cater for "Assay API 2" and "Assay API 3" which may contain blank values for certain products/records.

 

Best regards,

Chris

1 ACCEPTED SOLUTION
4 REPLIES 4

Many thanks, the first two references are great, i had to buy the book in which details are discussed and managed to solve my problem.

 

Best regards,

Chris

Further to my last response, if I put the value of the measure in a card i get the following:

 

Screenshot 2020-06-02 at 10.20.35.png

 

Screenshot 2020-06-02 at 12.54.07.png

 The above is in contrast to the values which appear in the grouped table below:

Screenshot 2020-06-02 at 10.21.55.png

 

so there is something i am getting wrong in the table.

 

Regards,

Chris

Thank you very much for your prompt response, mos appreciated.

 

My approach is similar to the first example you referred me to on "Dynamic segmentation".  The other examples are not suitable for my situation.  However the "Dynamic segmentation" example gives the same results as my approach.

 

Best regards,

Chris

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

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.