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

Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now

Reply
Anonymous
Not applicable

Calculate the difference between mean averages with taking into account blank data

Hello everyone,

 

I want to create a measure which subtracts the AVERAGE GAP between two prices from different tables. i mean average GAP because there might be more than two prices within a day.

 

The tables are:

    

DatePrice Product A
01-feb1,2
05-may1,3
06-ago1,09
06-ago1,1
07-sep1,5

        

DatePrice Product B
01-feb0,9
05-may1,05
06-ago0,8
06-ago0,75
12-nov 0,7

   

Date Average Price AAverage Price B
01-feb1,2  0,9
05-may1,31,05
06-ago1,095 0,775
07-sep1,5-
12-nov0,7

The expected GAP should be:

DateGAP Averages
01-feb 0,30
05-may0,25
06-ago0,32
07-sep0
12-nov  0 

  

In September 7th and November 12th I DONT wanna have these averages calculated or shown on my graph.

 

 

 

1 ACCEPTED SOLUTION
amitchandak
Super User
Super User

@Anonymous , Create a common date Table, then have measures like

 

A1= Average(Table1[Price Product A])

 

B1 = Average(Table2[Price Product B]) 

 

 

diff = if([A1] = [B1], blank(), [A1] - [B1])

 

https://amitchandak.medium.com/power-bi-when-i-asked-you-to-create-common-tables-a-quick-dax-solution-8e3eccb41bda

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

View solution in original post

3 REPLIES 3
amitchandak
Super User
Super User

@Anonymous , Create a common date Table, then have measures like

 

A1= Average(Table1[Price Product A])

 

B1 = Average(Table2[Price Product B]) 

 

 

diff = if([A1] = [B1], blank(), [A1] - [B1])

 

https://amitchandak.medium.com/power-bi-when-i-asked-you-to-create-common-tables-a-quick-dax-solution-8e3eccb41bda

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube
Anonymous
Not applicable

Hello,

 

Thank you! It has helped me out. One last question. If I want to avoid negative results, how may I?

 

 

Anonymous
Not applicable

Hello @amitchandak 

 

It has helped me out. One last question. If I want to avoid negative results, how may I?

Helpful resources

Announcements
November Power BI Update Carousel

Power BI Monthly Update - November 2025

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

Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.

Top Solution Authors
Top Kudoed Authors