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
SO
Helper III
Helper III

Text Measure and Matrix Value / Row issues

This is my first post.  This is a very simple, but frustrating issue and complicated because we are using Analytic Services (hence no access to Query Editor). 

I have a field called ClassCode.  The class code is and all of the data within it is of the format Class and Section number for example, 

ClassCode

ABC101-01
ABC101-02
XYZ202-01
XYZ202-02
Class - Section #


People are assigned to each Classcode.  

ClassCode         ClassCount#
ABC101-01           30
ABC101-02           22
XYZ202-01           20
XYZ202-02           28

I want to strip away the Section Numbers so that I can find the number of people in each Class.  

I used a simple measure 

Class= LEFT( MAX( 'BoardAttendanceDetail'[ClassCode]), 6 )
For example, ABC101-01 becomes ABC101

I ultimately am trying to produce a Matrix or TreeMap, showing the following 

  

Class               ClassCount#
ABC101               52
XYZ202               48

I can create a table 

 

ClassCode         ClassCount#      Class

ABC101-01           30                   ABC101
ABC101-02           22                   ABC101
XYZ202-01           20                   XYZ202
XYZ202-02           28                   XYZ202


I am Not able to use the Class measure in a Matrix, TreeMap, etc., where I need to place Class as a Row, Column, etc.  I cannot drop the field "Class" into either the Column or Row.   

CapturePBI.PNG

 

 

I tried experimenting with the format of the Measure.  I tired experimenting with the Matrices, but I have been stuck with this really simple challenge.  I do know I could address this with the Query Builder; however, we are building this out through Analytic Services, so I need to find ways that will work for builders. 

I have reviewed the Forums, and have not found a solution.  I have worked with many numerical measures and have not had this issue.  Any thoughts would be appreciated.  

Many thanks 

1 ACCEPTED SOLUTION
v-joesh-msft
Solution Sage
Solution Sage

Hi @SO ,

A measure cannot be placed in the Rows or Columns of the matrix. You need to create the column "Class" in the Analytic Services and then connect it to the power bi.

Best Regards,
Community Support Team _ Joey
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

1 REPLY 1
v-joesh-msft
Solution Sage
Solution Sage

Hi @SO ,

A measure cannot be placed in the Rows or Columns of the matrix. You need to create the column "Class" in the Analytic Services and then connect it to the power bi.

Best Regards,
Community Support Team _ Joey
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

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.