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

Level up your Power BI skills this month - build one visual each week and tell better stories with data! Get started

Reply
RJR71
New Member

Translate "++" into a value and do a calculation

Hi,

 

I have 2 problems and I could not find a good answer. I belive it is no big deal in DAX, but I do not know how to do it.

I did a survey with MS-Forms. Thereby ++ stood for very good, 0 for neutral and -- for very bad.
Now I got a table like this:

ZielBild
++
+
0
-
--

 

But I need a sum as well as a mean value (Average value). If I take ++=2; +=1; 0=0; -=-1 and --=-2, the table would look like this:

ZielBildRepresents Value
++2
++2
+1
--1
00
---2
  
SUM2
Avarage0,333


My second problem is very similar. How do I get the sum (blue row) at the end?

2. Example    SUM
++---++1
2-2-1111


Thank for your help in Advance.

RJR

1 ACCEPTED SOLUTION
v-robertq-msft
Community Support
Community Support

Hi, @RJR71 

According to your two expected tables, I think you can simply achieve this using the Matrix visual in the Power BI, you can try my steps:

  1. To get the first table, you can create a matrix and place it like this:

v-robertq-msft_0-1618555377856.png

 

You can change the summarize type of the total row and change the name of the total row like this:

v-robertq-msft_1-1618555377859.png

 

  1. To get the second table, you can create a matrix and place it like this:

v-robertq-msft_2-1618555377883.png

 

And you can get what you want.

You can download my test pbix file below

 

More info about the matrix visual in Power BI

Thank you very much!

 

Best Regards,

Community Support Team _Robert Qin

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

3 REPLIES 3
RJR71
New Member

Is solved the problem in the table by replacing the "Symbols" with numbers. My problem was, that I did not see, that all columns must be "Text" to do it. I had some as a number, and so I got errors by updating the table.

 

But thanks to all!!! You helpt me a lot with your answers.

THANKS

 

RJR

v-robertq-msft
Community Support
Community Support

Hi, @RJR71 

According to your two expected tables, I think you can simply achieve this using the Matrix visual in the Power BI, you can try my steps:

  1. To get the first table, you can create a matrix and place it like this:

v-robertq-msft_0-1618555377856.png

 

You can change the summarize type of the total row and change the name of the total row like this:

v-robertq-msft_1-1618555377859.png

 

  1. To get the second table, you can create a matrix and place it like this:

v-robertq-msft_2-1618555377883.png

 

And you can get what you want.

You can download my test pbix file below

 

More info about the matrix visual in Power BI

Thank you very much!

 

Best Regards,

Community Support Team _Robert Qin

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

HotChilli
Community Champion
Community Champion

You can add a calculated column which gives the numeric value for each text value.  You can do this with an 

IF or SWITCH statement e.g. 

AltColumn = SWITCH (
    [ZielBild],
    "++", 2,
    "--", -2,
    the other cases,
    0
)

 

Write two measures using the new column. One with SUM, one with AVERAGE.

Helpful resources

Announcements
April Power BI Update Carousel

Power BI Monthly Update - April 2026

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

Fabric SQL PBI Data Days

Data Days 2026 coming soon!

Sign up to receive a private message when registration opens and key events begin.

New to Fabric survey Carousel

New to Fabric Survey

If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.

Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.