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

Revenue duplicating across line items

It's got to be a group by function in power query or something but I haven't been able to figure it out, I've tried sumx but couldn't get that to work either.

 

I'm trying to create a table by Sales Document # that includes Planned and Recognized Revenue by RevStream.  A single Sales Document # could include anywhere from 1-8 Rev Streams with those Streams having individual planned revenue amounts. What is happening is my Sum of Recognized Revenue is being duplicated across the individual RevStreams and reflecting the whole number for the Sales Document which is throwing off my Rev Rec %. Thanks!

 

Current

Sales DocumentBill ToOrder Intake DateRev StreamPlanned RevenueRecognized Revenue% Recognized
874967Customer 14/30/2020Hardware$1,886,350$00%

654388

Customer 25/1/2020Hardware$269,013$271,213100.82%
654388Customer 25/1/2020Implementation Services$2,200$271,21312327.87%

 

Requested

Sales DocumentBill ToOrder Intake DateRev StreamPlanned RevenueRecognized Revenue% Recognized
874967Customer 14/30/2020Hardware$1,886,350$00%

654388

Customer 25/1/2020Hardware$269,013$269,013100%
654388Customer 25/1/2020Implementation Services$2,200$2,200100%
1 ACCEPTED SOLUTION
Anonymous
Not applicable

I ended up creating a revenue stream abbreviation in the two tables (orders, revenue) and used combinevalues to create a link code between sales document and rev stream in both tables.
654388-IpS
654388-HW
etc...

View solution in original post

2 REPLIES 2
v-alq-msft
Community Support
Community Support

Hi, @Anonymous 

 

Based on your description, I created data to reproduce your scenario. The pbix file is attached in the end.

 

Table:

i1.png

 

You may create two measures as below.

 

Recognized Revenue = 
var _flag = 
COUNTROWS(
    FILTER(
        ALL('Table'),
        'Table'[Sales Document]=SELECTEDVALUE('Table'[Sales Document])
    )
)
return
IF(
    _flag=1,
    0,
    IF(
        _flag>1,
         SUM('Table'[Planned Revenue])
    )
)

% Recognized = 
DIVIDE(
     [Recognized Revenue],
     SELECTEDVALUE('Table'[Planned Revenue])
)

 

Result:

i2.png

 

 

Best Regards

Allan

 

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

 

Anonymous
Not applicable

I ended up creating a revenue stream abbreviation in the two tables (orders, revenue) and used combinevalues to create a link code between sales document and rev stream in both tables.
654388-IpS
654388-HW
etc...

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.