cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
MahsaR
Frequent Visitor

group and sum

Hello,

i would be thankful, if youcould help me to find out how to solve this problem.

 

Here is my sample inputs:

inputs.JPG

expected sample output:( to sum th soll quantity according to month, plannungressournr. and ressourcenr.)

outputs.JPG

my result after implementation is as following which the concept is not the same as i what i expected. because soll is total quantity but i want to have it seperatly for each group.

1.png

 

i used this measurement for calculating"soll", but in my tables what i see is different than my expected output.measure.JPG

 

Thank you for your time.

4 REPLIES 4
amitchandak
Super User IV
Super User IV

@MahsaR ,Can you share sample data and sample output in table format? Or a sample pbix after removing sensitive data.



Did I answer your question? Mark my post as a solution! Appreciate your Kudos!!
Dashboard of My Blogs !! YouTube Channel !! Connect on Linkedin

Proud to be a Super User!

AilleryO
Continued Contributor
Continued Contributor

Hi,

 

Did you try using SUMMARIZECOLUMNS ? or SELECTEDVALUE?

Let us know

MahsaR
Frequent Visitor

i used SUMMARIZECOLUMNS  but if i am right,its giving me result in new tablebut i want to have a measure in my dashboard and use it with matrix visualisation.

AilleryO
Continued Contributor
Continued Contributor

Hi,

You're right the SUMMARIZECOLUMNS returns multiple results, but as far as I understand your problem, you want to "filter" with the line context.

Try adding a SELECTEDVALUE in your calculation :

More details on that :

https://www.sqlbi.com/articles/using-the-selectedvalue-function-in-dax/

or

https://docs.microsoft.com/fr-fr/dax/selectedvalue-function

But for me the SQLBI explanation is more clear.

Let us know if it works...

 

Helpful resources

Announcements
PBI User Groups

Welcome to the User Group Public Preview

Check out new user group experience and if you are a leader please create your group

April Update

Check it Out!

Click here to read more about the April 2021 Updates!

MBAS Carousel

Sign up for our May 4th event!

May the fourth be with you, join us online!

secondImage

The largest Power BI virtual conference

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