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
Anonymous
Not applicable

can I calculate grand total applying visual filters?

Hello guys 🙂

 

That's my "model"1.png

 

my calculated column "a_ClientTotal" is:


a_ClientTotal = CALCULATE(sum(Dados[Value]),ALL('Dados'),filter(Dados,Dados[Client] = EARLIER(Dados[Client])))

 

I'm trying to change my Date filter and my calculated column keep the value.
2.png3.png

 

What I missing in my dax calculated column?

 

Tks.

 

1 ACCEPTED SOLUTION
v-yulgu-msft
Employee
Employee

Hi @Anonymous,

 

You want the returned values by a_ClientTotal can be dynamically changed depend on date slicer range, right?

 

If so, you should create a measure like below rather than a calculated column, as calculated column values are initialized since it is created.

a_ClientTotal = CALCULATE( sum(Dados[Value]),ALLSELECTED(Dados[Date]))

Below is the result in my test.

1.PNG2.PNG

 

Best regards,

Yuliana Gu

Community Support Team _ Yuliana Gu
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
v-yulgu-msft
Employee
Employee

Hi @Anonymous,

 

You want the returned values by a_ClientTotal can be dynamically changed depend on date slicer range, right?

 

If so, you should create a measure like below rather than a calculated column, as calculated column values are initialized since it is created.

a_ClientTotal = CALCULATE( sum(Dados[Value]),ALLSELECTED(Dados[Date]))

Below is the result in my test.

1.PNG2.PNG

 

Best regards,

Yuliana Gu

Community Support Team _ Yuliana Gu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Ashish_Mathur
Super User
Super User

Hi @Anonymous,

 

Sorry, i am not clear.  What result are you expecting?


Regards,
Ashish Mathur
http://www.ashishmathur.com
https://www.linkedin.com/in/excelenthusiasts/
Meirieli
New Member

Hi, @Anonymous,

 

You can follow the steps bellow:

 

1 - Create a measure called Total Value:

 

Total Value = SUM(Dados[Value])

 

2 - Create a measure Called b_ClientTotal:

b_ClientTotal = CALCULATE([Value],ALLEXCEPT(Dados,Dados[Client],Dados[Date]))

 

That´s all Folks

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.