Power BI is turning 10, and we’re marking the occasion with a special community challenge. Use your creativity to tell a story, uncover trends, or highlight something unexpected.
Get startedJoin us for an expert-led overview of the tools and concepts you'll need to become a Certified Power BI Data Analyst and pass exam PL-300. Register now.
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
This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.
Check out the June 2025 Power BI update to learn about new features.
User | Count |
---|---|
10 | |
9 | |
8 | |
7 | |
6 |
User | Count |
---|---|
14 | |
13 | |
11 | |
9 | |
8 |