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

The ultimate Microsoft Fabric, Power BI, Azure AI & SQL learning event! Join us in Las Vegas from March 26-28, 2024. Use code MSCUST for a $100 discount. Register Now

Reply
jonatan_ap
Helper I
Helper I

Add a measure at the end of a matrix

Hi Everyone,

 

My case is that I have a matrix and would like to add a measure at the end of it. Currently, when I add that measure the matrix looks like this:

 

AnswersYes  No  
Questions#%New Measure#%New Measure
1. Did the advisor open the call appropriately?143695% 735% 
2. Did the Advisor identify/discover the situation of the Customer?27818% 272% 
3. Did the Advisor explain/provide proper Solutions & Education based on the circumstances?128885% 20714% 
4. Did the Advisor properly close the call?15710% 50% 
5. Did the Advisor relate to the Customer and/or bridge if necessary?20015% 100% 

 

But I need the matrix to look like this:

 

AnswersYes No  
Questions#%#%New Measure
1. Did the advisor open the call appropriately?143695%735% 
2. Did the Advisor identify/discover the situation of the Customer?27818%272% 
3. Did the Advisor explain/provide proper Solutions & Education based on the circumstances?128885%20714% 
4. Did the Advisor properly close the call?15710%50% 
5. Did the Advisor relate to the Customer and/or bridge if necessary?     

 

I've been reading possible solutions and I found something related to custom hierarchies, I don't know if that's the solution, but I'm trying to implement it with no success. Is this doable in Power BI?

3 REPLIES 3
jonatan_ap
Helper I
Helper I

Hi Everyone,

 

My case is that I have a matrix and would like to add a measure at the end of it. Currently, when I add that measure the matrix looks like this:

 

AnswersYes  No  
Questions#%New Measure#%New Measure
1. Did the advisor open the call appropriately?143695% 735% 
2. Did the Advisor identify/discover the situation of the Customer?27818% 272% 
3. Did the Advisor explain/provide proper Solutions & Education based on the circumstances?128885% 20714% 
4. Did the Advisor properly close the call?15710% 50% 
5. Did the Advisor relate to the Customer and/or bridge if necessary?20015% 100% 

 

But I need the matrix to look like this:

 

AnswersYes No  
Questions#%#%New Measure
1. Did the advisor open the call appropriately?143695%735% 
2. Did the Advisor identify/discover the situation of the Customer?27818%272% 
3. Did the Advisor explain/provide proper Solutions & Education based on the circumstances?128885%20714% 
4. Did the Advisor properly close the call?15710%50% 
5. Did the Advisor relate to the Customer and/or bridge if necessary?     

 

I've been reading possible solutions and I found something related to custom hierarchies, I don't know if that's the solution, but I'm trying to implement it with no success. Is this doable in Power BI?

v-yangliu-msft
Community Support
Community Support

Hi  @jonatan_ap ,

I created some data:

vyangliumsft_0-1682060849523.png

 

This is by design of Power BI, Meausre will act on Column on each matrix.

You can consider creating a new table by adding columns to it.

In [Group], there are "Yes" and "No", we can put all the values of Measure into "Yes" by IF judgment, and then Set an impossible value (say 99999) into "No", and finally delete this non-existent part.

 

Here are the steps you can follow:

1. Create measure.

 

Table 2 =
var _table1=
SUMMARIZE(
    'Table',
    'Table'[Qusetions],'Table'[Group],
    "Group2","Measure",
    "Value",
    IF(
        'Table'[Group]="Yes",1,99999))
var _table2=
UNION(
    'Table',_table1)
return
FILTER(
    _table2,[Value]<>99999)

vyangliumsft_1-1682060849525.png

2. Result:

vyangliumsft_2-1682060898232.png

 

Best Regards,

Liu Yang

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

Hi,

 

I appreciate your help, I understand your example, you're using one table to create the measure and the value. In my case, your Table becomes 3 different tables in my design. I have the table Questions, the table Answers, and the table Evaluations that is one containing the # column in my matrix. The % column is just the same # column but I changed the "Show Value as" to Percent of row total. 

Like this:

Yellow: Tables in use.

Green: The key from the Question table and Evaluations table

Blue: The key from the Answers table to Evaluations table

 

jonatan_ap_0-1682117194760.png

and my Matrix is something like this:

jonatan_ap_1-1682117354551.png

jonatan_ap_2-1682117407076.png

How can I jump from these 3 tables to do what you're explaining?

 

And the measure I want to add I created in the Evaluation table, like this:

jonatan_ap_0-1682117601825.png

 

Thanks again for your help, I really appreciate it.

 

 

Helpful resources

Announcements
Fabric Community Conference

Microsoft Fabric Community Conference

Join us at our first-ever Microsoft Fabric Community Conference, March 26-28, 2024 in Las Vegas with 100+ sessions by community experts and Microsoft engineering.

February 2024 Update Carousel

Power BI Monthly Update - February 2024

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

Fabric Career Hub

Microsoft Fabric Career Hub

Explore career paths and learn resources in Fabric.

Fabric Partner Community

Microsoft Fabric Partner Community

Engage with the Fabric engineering team, hear of product updates, business opportunities, and resources in the Fabric Partner Community.