Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Grow your Fabric skills and prepare for the DP-600 certification exam by completing the latest Microsoft Fabric challenge.

Reply
brunofranc
Frequent Visitor

Count Services inside a Promo Combo Sales

How can I count diferent sales inside Combo Order? 
There is a table with all services (table_services) and another with combos (table_combos).
In the "transactions_table" use all the codes, but the challenge is report total of services and minutes sales in a bar graphic.

 

For Examples:
Service 1 - 10 Sales - 300 minutes

Service 2 - 10 Sales - 450 minutes

...

Is possible create a measure to calculate this?

 

The tables are bellow:

table_services

IDServiceNameDuration (min)
501Service130
502Service245
503Service390
504Service460

 

table_combos

IDcombosDescription
10052 x 502  + 3 x 504
10066 x 501

 

transactions_table

DateOrderidClientidIDs
20/02/2019

0123

0011005
20/02/20190123001504
01/03/201901560021006
02/03/20190189003501

 

1 ACCEPTED SOLUTION

Hi @brunofranc ,

 

Please refer to my .pbix file.

jjj5.PNG

 

Best regards,
Lionel Chen

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

6 REPLIES 6
v-lionel-msft
Community Support
Community Support

Hi @brunofranc ,

 

xxx4.PNG

How are these two values calculated? I don't quite understand their calculation logic.

 

Best regards,
Lionel Chen

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

 
 

For example, in order id 123, there are 1 combo 1005 and 1 of 504. 
Combo 1005 is:

 

2 x IDService 502 and 3 x Service ID504


And then 2 x 45 = 90 min 

               3 x 60 = 180 min
And the amount is 2 +3 = 5
 

sales sample.png

Hi @brunofranc ,

 

Please refer to my .pbix file.

jjj5.PNG

 

Best regards,
Lionel Chen

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

 

amitchandak
Super User
Super User

@brunofranc , You need to split table_combos twice.

Split Description by + in new rows

And the split the new column into 2 columns on X

 

You will have your combo split into a row with Qty and service Id

Refer how to do (Edit Query = Data Transformation )

https://www.tutorialgateway.org/how-to-split-columns-in-power-bi/

 

It's not in this way.
Maybe like this: 
The ID equals a sum  of other 2 IDs.

Helpful resources

Announcements
RTI Forums Carousel3

New forum boards available in Real-Time Intelligence.

Ask questions in Eventhouse and KQL, Eventstream, and Reflex.

MayPowerBICarousel1

Power BI Monthly Update - May 2024

Check out the May 2024 Power BI update to learn about new features.