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

To celebrate FabCon Vienna, we are offering 50% off select exams. Ends October 3rd. Request your discount now.

Reply
apple43
Frequent Visitor

Count within a baseline

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: 

SellerQtyProductCountryPrice per unitBaseline (price per unit)Total SalesCommissionTotal Comission
Jane60ABR5,563302%6,6
John30AGB6,571952%3,9
Anne20BGB7,56,5150No 
John15BGB6,97103,502%2.07
Peter75BBR6,56487,5No 

 

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!

4 REPLIES 4
Anonymous
Not applicable

Hi @apple43 

 

Thanks for the reply from uzuntasgokberk and GiuseppeMR .

 

Is this the desired outcome you want? Please refer to the test below. 

vxuxinyimsft_0-1739251695837.png

 

Sample data:

vxuxinyimsft_1-1739243309808.png

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!

GiuseppeMR
Frequent Visitor

Hi ,

Try this:

 

Measure =

Calculate(

   Sum(qty),

   "Unit price" <= "baseline"

)

uzuntasgokberk
Super User
Super User

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 |

Helpful resources

Announcements
September Power BI Update Carousel

Power BI Monthly Update - September 2025

Check out the September 2025 Power BI update to learn about new features.

August 2025 community update carousel

Fabric Community Update - August 2025

Find out what's new and trending in the Fabric community.

Top Solution Authors