Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.
Register now!To celebrate FabCon Vienna, we are offering 50% off select exams. Ends October 3rd. Request your discount now.
Hi Community,
I have following situation:
I need to have a measure that gives me number of sales that are within specific baseline.
See below an example:
Seller | Qty | Product | Country | Price per unit | Baseline (price per unit) | Total Sales | Commission | Total Comission |
Jane | 60 | A | BR | 5,5 | 6 | 330 | 2% | 6,6 |
John | 30 | A | GB | 6,5 | 7 | 195 | 2% | 3,9 |
Anne | 20 | B | GB | 7,5 | 6,5 | 150 | No | |
John | 15 | B | GB | 6,9 | 7 | 103,50 | 2% | 2.07 |
Peter | 75 | B | BR | 6,5 | 6 | 487,5 | No |
Correct Asnwer show be = 105 units
There are different baselines with combination: Product+Country
I have tried to flag whenever Price per unit <= Baseline, Then 1. But when I apply to a Visual a filter where flag=1, does not list anything.
Can you help me?
Thank you!
Hi @apple43
Thanks for the reply from uzuntasgokberk and GiuseppeMR .
Is this the desired outcome you want? Please refer to the test below.
Sample data:
I used some of the sample data you showed. I want to confirm with you whether these data are original data. If there are calculated columns or measures, we need you to show the corresponding formulas to better reproduce your scenario.
Create a measure as follows
Measure = CALCULATE(SUM('Table'[Qty]), FILTER('Table', 'Table'[Price per unit] <= 'Table'[Baseline (price per unit)]))
Best Regards,
Yulia Xu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi @Anonymous ,
Your suggestion is not working!
Regarding information about data:
- Qty (measure) - table1[qty] = CALCULATE([Qty], Product[Product]= "A"|| Product[Product]= "B")
- price per unit (measure) - table2[Price per unit] (DirectQuery)
- baseline (measure) - table3[baseline] (DirectQuery)
Neither are calculated columns.
Thanks in advance!
Hi ,
Try this:
Measure =
Calculate(
Sum(qty),
"Unit price" <= "baseline"
)
Hello @apple43 ,
Could you please share your demo ppix and your dax code?
Kind Regards,
Gökberk Uzuntaş
📌 If this post helps, then please consider Accepting it as a solution and giving Kudos — it helps other members find answers faster!
🔗 Stay Connected:
📘 Medium |
📺 YouTube |
💼 LinkedIn |
📷 Instagram |
🐦 X |
👽 Reddit |
🌐 Website |
🎵 TikTok |