Power BI is turning 10! Tune in for a special live episode on July 24 with behind-the-scenes stories, product evolution highlights, and a sneak peek at what’s in store for the future.
Save the dateEnhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.
Hello,
I have the table bellow with date, order number, value and 5 columns for the 5 promotions that i can use an each order.
What is the best way to get total orders by promotions and the quantity orders by promotion.
Regard that i can have the same promotion in difierent column buy never same promotion on the same order (Row)
Thaks for all
Regards
Luis
I would unpivot your promotion columns.
Hu Greg,
I tried that, but with that i got duplicates orders values.
Sorry, im really bad with pivot and unpivot ;(
thanks
Means that for each order we can have up to 5 promotions attached.
Ex:
Order 10, can have, 10% discount for the 1st purchase, 10% birthday month, Free shipping and 15% discount with salesman code
Order 20, can have free Shipping and 10% discont for the fisrt purchase
Order 30, can have 10% birthday discount
Order 40, can have 15% discount with salesman code
....
regards
Luis
Here's a solution attached that uses the Many-To-Many technique. Please analyze this thoroughly so that you understand it. I've put a note in the report that explains why it's working the way it does. If you want to know more about Many-To-Many, then please go to www.sqlbi.com and search for articles on it by typing in the Search Box "many to many."
Best
D
Check out the July 2025 Power BI update to learn about new features.
This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.
User | Count |
---|---|
20 | |
7 | |
6 | |
5 | |
5 |
User | Count |
---|---|
26 | |
10 | |
10 | |
9 | |
6 |