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
Wresen
Post Patron
Post Patron

Make a variable out of sum value

Hi and thanks for reading this.

 

I have a problem that i have problem solving myself.

 

m1.png

I have a month and i measure that sums the value for that month.

I would like to be able to add day(nr) to this table and have the "measure" value as it is (179744) for all day(nr) , also i would like the measure to be able to react if slicer is added that would change the totel sum.  see below:

m3.png

 

If i add days now it looks like this:

m2.png

 

/Thanks

2 ACCEPTED SOLUTIONS
Anonymous
Not applicable

@Wresen I assume your first measure is smoething like this

CALCULATE(SUM('Table'[Value]),ALL('Table'[Month]))
Change it to

CALCULATE(SUM('Table'[Value]),ALL('Table'[Month],'Table'[Day]))

Put the day column as argument in all function

View solution in original post

v-easonf-msft
Community Support
Community Support

Hi, @Wresen,

Here is a sample I made:

url:

https://wicren-my.sharepoint.com/:u:/g/personal/michael_wicren_onmicrosoft_com/Ebsy0Qis3FdPvM3pHy_l_... 

 

Annotation 2019-12-10 165419.png

 
 

 

You can take a  try of  measure like  Measure8

Measure8 = CALCULATE(SUM('Table'[Value] ),ALLEXCEPT('Table','Table'[Month]))

 

If I  misunderstood your question, please let me know.

Best Regards,

Eason

Community Support Team _ Eason Fang

View solution in original post

4 REPLIES 4
v-easonf-msft
Community Support
Community Support

Hi, @Wresen,

Here is a sample I made:

url:

https://wicren-my.sharepoint.com/:u:/g/personal/michael_wicren_onmicrosoft_com/Ebsy0Qis3FdPvM3pHy_l_... 

 

Annotation 2019-12-10 165419.png

 
 

 

You can take a  try of  measure like  Measure8

Measure8 = CALCULATE(SUM('Table'[Value] ),ALLEXCEPT('Table','Table'[Month]))

 

If I  misunderstood your question, please let me know.

Best Regards,

Eason

Community Support Team _ Eason Fang

Hi v-easonf-msft

 

Thanks so much for that code , acctully measure 6 and 7 was the one i was looking for .

 

Really appriciate it.

 

Anonymous
Not applicable

@Wresen I assume your first measure is smoething like this

CALCULATE(SUM('Table'[Value]),ALL('Table'[Month]))
Change it to

CALCULATE(SUM('Table'[Value]),ALL('Table'[Month],'Table'[Day]))

Put the day column as argument in all function

Hi vimal_parmar

 

Thanks so much for your help.

I just needed to do:

CALCULATE(SUM('Table'[Value]),ALL(Table'[Day]))

 

to get it as i wanted , and i would not have solved it without your help.

 

/Thanks

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.