cancel
Showing results for
Did you mean:
Helper I

## Total for results of a measure

Hi,

So I have to create a measure for a couple of conditions. If it is true, then use the following formula, if it is false then -1.

Which has worked. But then I want the total of the results which did not work. How do get the correct sum of the results of the measure?

Thank you

1 ACCEPTED SOLUTION
Community Support

Hi @powerbiwork ,

According to your description, here’s my solution.

1.Creteat a measure like you.

Measure1 =

IF (

SUM ( 'Opportunity'[Total ACV(USD)] ) = 0

&& SUM ( 'Opportunity'[One Off License(USD)] ) > 0,

* SUM ( 'Commission-Model'[Commission:Rates0-50%] )

* SUM ( 'Commission-Model'[ACV-First-Yr-Maint] ),

IF (

SUM ( 'Opportunity'[Total ACV(USD)] ) > 0

&& SUM ( 'Opportunity'[One Off License(USD)] ) > 0,

-1

)

)

2.Create another measure for the result.

Best Regards,
Community Support Team _ kalyj

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

3 REPLIES 3
Community Support

Hi @powerbiwork ,

According to your description, here’s my solution.

1.Creteat a measure like you.

Measure1 =

IF (

SUM ( 'Opportunity'[Total ACV(USD)] ) = 0

&& SUM ( 'Opportunity'[One Off License(USD)] ) > 0,

* SUM ( 'Commission-Model'[Commission:Rates0-50%] )

* SUM ( 'Commission-Model'[ACV-First-Yr-Maint] ),

IF (

SUM ( 'Opportunity'[Total ACV(USD)] ) > 0

&& SUM ( 'Opportunity'[One Off License(USD)] ) > 0,

-1

)

)

2.Create another measure for the result.

Best Regards,
Community Support Team _ kalyj

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Helper I

Thank you!

Super User

You must consider, on the total row the model does not look at any of the rows above.  It is calculated completely separate and independent.  Take a look at this article that discusses the topic.

https://www.sqlbi.com/articles/obtaining-accurate-totals-in-dax/

Announcements

#### CollabDays Lisbon - 26 November 2022

Sessions include practical, hands-on experience that will help you take the next step in your career and know-how.

#### Difinity Conference 2022

Difinity is the largest Microsoft Data, AI, Power BI, Power Platform and Business Applications Conference in New Zealand.

#### European Share Point Conference

This conference returns live and in-person in Copenhagen this 28 November-01 December with 4 Microsoft Keynotes, 9 Tutorials, and 120 Sessions.

#### Microsoft 365 Conference - 06-08 December

Join us in Las Vegas to experience community, incredible learning opportunities, and connections that will help grow skills, know-how, and more.

Top Solution Authors
Top Kudoed Authors