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

Calling all Data Engineers! Fabric Data Engineer (Exam DP-700) live sessions are back! Starting October 16th. Sign up.

Reply
Anonymous
Not applicable

DAX Measure for calculating average from a table in power bi ........

Hi Everybody,

 

Any help appreciated, pretty new at this.   I have created a table in Power BI that comes from 3 different tables in the dataset.  The table contains 5 columns.   

 

  • I need to now create 3 Cards. 

           1 Card that will give me total rows in the Power BI table

           1 Card that shows me a distinct count of 1 of the columns in the Power BI table

           1 Card that shows me the average (total rows divided by distinct count) in the Power BI table

 

How would I go about getting the correct numbers for the total rows, distinct count, and avg.  from the rows that only show in the Power BI table ?  (Not the data tables)

 

(Using Distinctcount and countrows on the actual table gives me the numbers from the actual tables in the dataset and not the Power BI table.....also ,  I have a slicer involved so the calcs need to be dynamic)

 

Thank you for any help

 

 
 
 
 
1 REPLY 1
amitchandak
Super User
Super User

@Anonymous , Avg of Distinct. a new measure

 

Averagex(Values(Table[Value]), [Value])

 

or

 

divide(distinctcount(Table[value]), countrows(distinct(Table[value])) )

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

Helpful resources

Announcements
FabCon Global Hackathon Carousel

FabCon Global Hackathon

Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes!

October Power BI Update Carousel

Power BI Monthly Update - October 2025

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

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.