cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
mscampos Regular Visitor
Regular Visitor

can I calculate grand total applying visual filters?

Hello guys Smiley Happy

 

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

Accepted Solutions
Community Support Team
Community Support Team

Re: can I calculate grand total applying visual filters?

Hi @mscampos,

 

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.
3 REPLIES 3
Meirieli Frequent Visitor
Frequent Visitor

Re: can I calculate grand total applying visual filters?

Hi, @mscampos,

 

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

Super User
Super User

Re: can I calculate grand total applying visual filters?

Hi @mscampos,

 

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

Community Support Team
Community Support Team

Re: can I calculate grand total applying visual filters?

Hi @mscampos,

 

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.