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

How to show averages based on 3 columns

Hi all,

 

 Trying to show 2 measures in cards;

  1. the likelihood an order will delay more than once [Card shows result like this "Orders delay on average x1.4 times"]
  2. if delays then cancels, how many times does it delays on average before cancellation.

 

[Data table shown below here]

PowerBI question - forum.jpg

4 REPLIES 4
AllisonKennedy
Super User
Super User

@Anonymous  a bit more info on your data would help us here, but here's my best guess at what you're after. 

 

Try a measure:

DelayLikelihood=DIVIDE(COUNTROWS(FILTER(Sales, Sales[Type of Issue]="Delayed")), COUNTROWS(FILTER(Sales,ALL(Sales[Type of Issue])), 0)

 

DelayAvg= AVERAGEX(SalesOrderHeaders, [DelayLikelihood])

To get the text around it you can use a custom visual or concatanate or COMBINEVALUES with the above measure and the text you want:

Card Value = "Orders delay on average x" & DelayAvg & " times"

 

Has this post solved your problem? Please mark it as a solution so that others can find it quickly and to let the community know your problem has been solved. 

 

If you found this post helpful, please give Kudos.

I work as a trainer and consultant for Microsoft 365, specialising in Power BI and Power Query. 

https://sites.google.com/site/allisonkennedycv


Please @mention me in your reply if you want a response.

Copying DAX from this post? Click here for a hack to quickly replace it with your own table names

Has this post solved your problem? Please Accept as Solution so that others can find it quickly and to let the community know your problem has been solved.
If you found this post helpful, please give Kudos C

I work as a Microsoft trainer and consultant, specialising in Power BI and Power Query.
www.excelwithallison.com

Hi @Anonymous ,

 

Could you tell me if your problem has been solved? Is the answer that AllisonKennedy helpful? If it is, kindly mark the helpful answer as solution if you feel that makes sense. Welcome to share your own solution. More people will benefit from the thread.

 

Best Regards,
Xue Ding
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
amitchandak
Super User
Super User

@Anonymous , sales order more than one delay

sumx(filter(summarize(Table, Table[sales order number], "_cnt",countx(filter(Table,table[type of issue]="Delayed"),Table[sales order number])),[_cnt]>=1),[sales order number])

 

The second one can you explain more Avg of what you need

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

Fantasitic, will try that, thank you. 

 

For the 2nd card; if the sales order has both a 'delayed' and a 'cancelled' entry (as the data is record in a log fashion, each new change is entered in a new row as it comes in), on average how many 'delayed' rows are there for the sales order number before it's 'cancelled'

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.