cancel
Showing results for 
Search instead for 
Did you mean: 

Fabric is Generally Available. Browse Fabric Presentations. Work towards your Fabric certification with the Cloud Skills Challenge.

Reply
Philipp_ISARTAX
New Member

Sum depending on Letters in Column

Hello all,

I'm a newbie in working with Power BI.

 

Actualy I have a data model with a tble which has in One Row several letters and in another row values.

 

Now I try to create a Measure with DAX-Formula which calculates the sum of the values only for the lines, where the Letter "B" is mentioned in the column of the letters.

 

I tried my best with SUMX or CALCULATE but it doesn't work and I don't understand why.

 

My Measure was:

 = CALCULATE(Sum('Table'[column_values]);'Table'[column_letters]="B")
 
Many thanks for your support!
1 ACCEPTED SOLUTION
Philipp_ISARTAX
New Member

Hello @Ahmedx  and @Uzi2019 ,

Thanks for your support. I found the solution.

 

The data in the table is not "V", it is " V" with a leading Space! This took hours to find out for me 😂
But I'm happy that it is now working.

 

Thanks for your support,

Kind regards,

Philipp

View solution in original post

9 REPLIES 9
Philipp_ISARTAX
New Member

Hello @Ahmedx  and @Uzi2019 ,

Thanks for your support. I found the solution.

 

The data in the table is not "V", it is " V" with a leading Space! This took hours to find out for me 😂
But I'm happy that it is now working.

 

Thanks for your support,

Kind regards,

Philipp

Uzi2019
Power Participant
Power Participant

Hi @Philipp_ISARTAX 
Can you share sample data and expected output??

 

 

Don't forget to give thumbs up and accept this as a solution if it helped you!!!
Ahmedx
Super User
Super User

To understand why your measure does not work, share some data

Hello @Ahmedx ,

hello @Uzi2019 ,

 

Please find as follows a screenshot from the table "Abgerechnete Gebühren" from Power Query with the relevant columns:

Screenshot Abgerechnete Gebühren.JPG

 

Here is the Measure and the used DAX-Formula:

Screenshot DAX Umsatz oVS.JPG

 

I would have expected the summarized total of the columns "Gebührenbetrag mit Mult..." over the lines where the letter "V" is in column "Abrechnungsart Gebühren".

 

As you can see in the card, the result is empty! 

after the filter must be approved ALL

Screenshot_1.png

Share sample pbix file to help you.

or try this
CALCULATE(SUM(....), FILTER(ALL(.....

Hello @Ahmedx ,

I don't know, if this works. Please find as follows the Link to the Sample-pbix-File:

Problem Sample.pbix

Thanks, Kind regards

Hello @Ahmedx ,

it doesn't work:

Philipp_ISARTAX_0-1700559678836.png

 

Screenshot_2.png

Helpful resources

Announcements
PBI November 2023 Update Carousel

Power BI Monthly Update - November 2023

Check out the November 2023 Power BI update to learn about new features.

Community News

Fabric Community News unified experience

Read the latest Fabric Community announcements, including updates on Power BI, Synapse, Data Factory and Data Activator.

Dashboard in a day with date

Exclusive opportunity for Women!

Join us for a free, hands-on Microsoft workshop led by women trainers for women where you will learn how to build a Dashboard in a Day!

Power BI Fabric Summit Carousel

The largest Power BI and Fabric virtual conference

130+ sessions, 130+ speakers, Product managers, MVPs, and experts. All about Power BI and Fabric. Attend online or watch the recordings.

Top Solution Authors
Top Kudoed Authors