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

Double revenue showing up in Card

Hi All,

 

I have a situation in my report where a single deal is having 2 stakeholders but when I'm calculating total revenue it is adding both the rows whereas it should add only distinct deal.

 

Like in the below screenshot I want to show the sum as $341.10 but it is doublng since I have 2 stakeholders on the same deal.

How can this be resolved?

 

I want to calculated Revenue with distinct Deal ID like below

 

Gross Revenue = CALCULATE(DISTINCTCOUNT(View_DealClosing[ID]) && CALCULATE(SUM(View_DealClosing[Estrevenue])))

 

 

Himanshu_13_0-1634122040063.png

 

For reference ( This is showing up wrong as its doubling the revenue) :

 

Himanshu_13_0-1634123404163.png

 

Kindly help in resolving this.

 

Regards,

Himanshu

1 ACCEPTED SOLUTION

Hi,  @Anonymous 

Since this result is being calculated multiple times, you can try to divide the result by each count of id (2).

C_Gross Revenue = 
VAR count_eachID =
    CALCULATE (
        COUNTROWS ( View_DealClosing ),
        ALLEXCEPT ( View_DealClosing, View_DealClosing[ID] )
    )
RETURN
    View_DealClosing[Estrevenue] / count_eachID

97.png

Youcan also try measure to change total value in table visual as below:

Gross Revenue =
IF (
    HASONEVALUE ( View_DealClosing[ID] ),
    SUM ( View_DealClosing[Estrevenue] ),
    SUM ( View_DealClosing[Estrevenue] ) / 2
)

 

Best Regards,
Community Support Team _ Eason

View solution in original post

4 REPLIES 4
Anonymous
Not applicable

@amitchandak can you help here?

 

Regards,

Himanshu

@Anonymous , Try like

Gross Revenue = sumx(values(View_DealClosing[ID]), CALCULATE(SUM(View_DealClosing[Estrevenue])))

 

but what is the benefit if both are sum

 

may be

 

Gross Revenue = sumx(values(View_DealClosing[ID]), CALCULATE(max(View_DealClosing[Estrevenue])))

Anonymous
Not applicable

Its giving me an error when I'm trying to create a 2nd calculated column using the above calculation.

 

Himanshu_13_0-1634131689149.png

 

Hi,  @Anonymous 

Since this result is being calculated multiple times, you can try to divide the result by each count of id (2).

C_Gross Revenue = 
VAR count_eachID =
    CALCULATE (
        COUNTROWS ( View_DealClosing ),
        ALLEXCEPT ( View_DealClosing, View_DealClosing[ID] )
    )
RETURN
    View_DealClosing[Estrevenue] / count_eachID

97.png

Youcan also try measure to change total value in table visual as below:

Gross Revenue =
IF (
    HASONEVALUE ( View_DealClosing[ID] ),
    SUM ( View_DealClosing[Estrevenue] ),
    SUM ( View_DealClosing[Estrevenue] ) / 2
)

 

Best Regards,
Community Support Team _ Eason

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.